Handling exceptions in jedi_completer thread

This commit is contained in:
Strahinja Val Markovic 2013-03-24 18:52:50 -07:00
parent edbcb3abfe
commit b4837c81fe

View File

@ -84,6 +84,7 @@ class JediCompleter( Completer ):
def SetCandidates( self ): def SetCandidates( self ):
while True: while True:
try:
WaitAndClear( self._query_ready ) WaitAndClear( self._query_ready )
filename = vim.current.buffer.name filename = vim.current.buffer.name
@ -97,7 +98,9 @@ class JediCompleter( Completer ):
'menu': str( completion.description ), 'menu': str( completion.description ),
'info': str( completion.doc ) } 'info': str( completion.doc ) }
for completion in script.complete() ] for completion in script.complete() ]
except:
self._query_ready.clear()
self._candidates = []
self._candidates_ready.set() self._candidates_ready.set()