Don't add candidates for "weird" buffers

This commit is contained in:
Strahinja Val Markovic 2012-05-05 18:12:15 -07:00
parent a557d35a43
commit 7468a5a21c

View File

@ -43,6 +43,10 @@ class CompletionSystem( object ):
idents = re.findall( self.pattern, text ) idents = re.findall( self.pattern, text )
filetype = vim.eval( "&filetype" ) filetype = vim.eval( "&filetype" )
filepath = vim.eval( "expand('%:p')" ) filepath = vim.eval( "expand('%:p')" )
if not filetype or not filepath:
return
self.completer.AddCandidatesToDatabase( idents, filetype, filepath ) self.completer.AddCandidatesToDatabase( idents, filetype, filepath )
def CurrentColumn(): def CurrentColumn():