From 7468a5a21c94e55758e25fe5e51b18c81158ef13 Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Sat, 5 May 2012 18:12:15 -0700 Subject: [PATCH] Don't add candidates for "weird" buffers --- python/ycm.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/ycm.py b/python/ycm.py index 9add3d86..eef0e9ed 100644 --- a/python/ycm.py +++ b/python/ycm.py @@ -43,6 +43,10 @@ class CompletionSystem( object ): idents = re.findall( self.pattern, text ) filetype = vim.eval( "&filetype" ) filepath = vim.eval( "expand('%:p')" ) + + if not filetype or not filepath: + return + self.completer.AddCandidatesToDatabase( idents, filetype, filepath ) def CurrentColumn():