Making sure filename exists before using it
This commit is contained in:
parent
7cf179e2b8
commit
6be3cd37ed
@ -80,6 +80,9 @@ class ClangCompleter( Completer ):
|
|||||||
def CandidatesForQueryAsync( self, query ):
|
def CandidatesForQueryAsync( self, query ):
|
||||||
filename = vim.current.buffer.name
|
filename = vim.current.buffer.name
|
||||||
|
|
||||||
|
if not filename:
|
||||||
|
return
|
||||||
|
|
||||||
if self.completer.UpdatingTranslationUnit( filename ):
|
if self.completer.UpdatingTranslationUnit( filename ):
|
||||||
vimsupport.PostVimMessage( 'Still parsing file, no completions yet.' )
|
vimsupport.PostVimMessage( 'Still parsing file, no completions yet.' )
|
||||||
self.completions_future = None
|
self.completions_future = None
|
||||||
@ -125,6 +128,9 @@ class ClangCompleter( Completer ):
|
|||||||
return
|
return
|
||||||
|
|
||||||
filename = vim.current.buffer.name
|
filename = vim.current.buffer.name
|
||||||
|
if not filename:
|
||||||
|
return
|
||||||
|
|
||||||
if self.completer.UpdatingTranslationUnit( filename ):
|
if self.completer.UpdatingTranslationUnit( filename ):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user