Fix rare traceback on <leader>d. Fixes #43
This commit is contained in:
parent
02201c866b
commit
a1c89f5108
@ -38,6 +38,7 @@ class ClangCompleter( Completer ):
|
|||||||
self.last_prepared_diagnostics = []
|
self.last_prepared_diagnostics = []
|
||||||
self.parse_future = None
|
self.parse_future = None
|
||||||
self.flags = Flags()
|
self.flags = Flags()
|
||||||
|
self.diagnostic_store = None
|
||||||
|
|
||||||
|
|
||||||
def SupportedFiletypes( self ):
|
def SupportedFiletypes( self ):
|
||||||
@ -163,8 +164,12 @@ class ClangCompleter( Completer ):
|
|||||||
current_column += 1
|
current_column += 1
|
||||||
|
|
||||||
current_file = vim.current.buffer.name
|
current_file = vim.current.buffer.name
|
||||||
diagnostics = self.diagnostic_store[ current_file ][ current_line ]
|
|
||||||
|
|
||||||
|
if not self.diagnostic_store:
|
||||||
|
vimsupport.PostVimMessage( "No diagnostic for current line!" )
|
||||||
|
return
|
||||||
|
|
||||||
|
diagnostics = self.diagnostic_store[ current_file ][ current_line ]
|
||||||
if not diagnostics:
|
if not diagnostics:
|
||||||
vimsupport.PostVimMessage( "No diagnostic for current line!" )
|
vimsupport.PostVimMessage( "No diagnostic for current line!" )
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user