Handling vim.error from omnifunc
If the omnifunc encounters a syntax error, we need to handle this without showing a traceback to the user.
This commit is contained in:
parent
e424d75c42
commit
91368c09ea
@ -95,7 +95,7 @@ class OmniCompleter( Completer ):
|
|||||||
raise TypeError( OMNIFUNC_NOT_LIST )
|
raise TypeError( OMNIFUNC_NOT_LIST )
|
||||||
|
|
||||||
return filter( bool, items )
|
return filter( bool, items )
|
||||||
except ( TypeError, ValueError ) as error:
|
except ( TypeError, ValueError, vim.error ) as error:
|
||||||
vimsupport.PostVimMessage(
|
vimsupport.PostVimMessage(
|
||||||
OMNIFUNC_RETURNED_BAD_VALUE + ' ' + str( error ) )
|
OMNIFUNC_RETURNED_BAD_VALUE + ' ' + str( error ) )
|
||||||
return []
|
return []
|
||||||
|
Loading…
Reference in New Issue
Block a user