diff --git a/python/completers/cpp/clang_completer.py b/python/completers/cpp/clang_completer.py index 1e6873ff..6865d4af 100644 --- a/python/completers/cpp/clang_completer.py +++ b/python/completers/cpp/clang_completer.py @@ -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