From 6579a1d05ddd01c63688333102b197aae198f9b6 Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Thu, 24 Jan 2013 17:14:10 -0800 Subject: [PATCH] Trivial refactoring --- python/completers/cpp/clang_completer.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/completers/cpp/clang_completer.py b/python/completers/cpp/clang_completer.py index add33215..f75b82bf 100644 --- a/python/completers/cpp/clang_completer.py +++ b/python/completers/cpp/clang_completer.py @@ -77,12 +77,13 @@ class ClangCompleter( Completer ): def CandidatesForQueryAsync( self, query ): - if self.completer.UpdatingTranslationUnit( vim.current.buffer.name ): + filename = vim.current.buffer.name + + if self.completer.UpdatingTranslationUnit( filename ): vimsupport.PostVimMessage( 'Still parsing file, no completions yet.' ) self.completions_future = None return - filename = vim.current.buffer.name flags = self.flags.FlagsForFile( filename ) if not flags: vimsupport.PostVimMessage( 'Still no compile flags, no completions yet.' )