Making sure filename exists before using it

This commit is contained in:
Strahinja Val Markovic 2013-02-06 18:46:57 -08:00
parent 7cf179e2b8
commit 6be3cd37ed

View File

@ -80,6 +80,9 @@ class ClangCompleter( Completer ):
def CandidatesForQueryAsync( self, query ):
filename = vim.current.buffer.name
if not filename:
return
if self.completer.UpdatingTranslationUnit( filename ):
vimsupport.PostVimMessage( 'Still parsing file, no completions yet.' )
self.completions_future = None
@ -125,6 +128,9 @@ class ClangCompleter( Completer ):
return
filename = vim.current.buffer.name
if not filename:
return
if self.completer.UpdatingTranslationUnit( filename ):
return