Fix error on YcmDebugInfo in quickfix window

Fixes #283
This commit is contained in:
Strahinja Val Markovic 2013-04-28 15:51:59 -07:00
parent 387102a99f
commit df7026e9b6

View File

@ -287,6 +287,8 @@ class ClangCompleter( Completer ):
def DebugInfo( self ): def DebugInfo( self ):
filename = vim.current.buffer.name filename = vim.current.buffer.name
if not filename:
return ''
flags = self.flags.FlagsForFile( filename ) or [] flags = self.flags.FlagsForFile( filename ) or []
source = extra_conf_store.ModuleFileForSourceFile( filename ) source = extra_conf_store.ModuleFileForSourceFile( filename )
return 'Flags for {0} loaded from {1}:\n{2}'.format( filename, return 'Flags for {0} loaded from {1}:\n{2}'.format( filename,