mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2026-10-26 15:43:26 +08:00
vim: catch if get_definition is returning a keyword
This commit is contained in:
1 parent
04dd7c8aee
commit
17aa6e48d3
1 file changed
+3
@@ -404,6 +404,9 @@ def _goto(is_definition=False, is_related_name=False, no_output=False):
|
||||
|
||||
d = list(definitions)[0]
|
||||
if d.in_builtin_module():
|
||||
if isinstance(d.definition, functions.keywords.Keyword):
|
||||
echo_highlight("Cannot get the definition of Python keywords.")
|
||||
else:
|
||||
echo_highlight("Builtin modules cannot be displayed.")
|
||||
else:
|
||||
if d.module_path != vim.current.buffer.name:
|
||||
|
||||
Reference in new issue
Block a user