mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-07 11:14:32 +08:00
@@ -293,10 +293,7 @@ def goto(mode="goto", no_output=False):
|
|||||||
"""
|
"""
|
||||||
script = get_script()
|
script = get_script()
|
||||||
if mode == "goto":
|
if mode == "goto":
|
||||||
definitions = [x for x in script.goto_definitions()
|
definitions = script.goto_assignments(follow_imports=True)
|
||||||
if not x.in_builtin_module()]
|
|
||||||
if not definitions:
|
|
||||||
definitions = script.goto_assignments()
|
|
||||||
elif mode == "related_name":
|
elif mode == "related_name":
|
||||||
definitions = script.usages()
|
definitions = script.usages()
|
||||||
elif mode == "definition":
|
elif mode == "definition":
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ describe 'goto simple'
|
|||||||
|
|
||||||
it 'goto definitions'
|
it 'goto definitions'
|
||||||
normal \d
|
normal \d
|
||||||
Expect line('.') == 1
|
Expect line('.') == 2
|
||||||
Expect col('.') == 5
|
Expect col('.') == 1
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'goto assignments'
|
it 'goto assignments'
|
||||||
|
|||||||
Reference in New Issue
Block a user