forked from VimPlug/jedi
fix problems with positions in definitions with the same name on the same line
This commit is contained in:
@@ -634,8 +634,12 @@ def follow_call_list(call_list, follow_array=False):
|
|||||||
def follow_call(call):
|
def follow_call(call):
|
||||||
"""Follow a call is following a function, variable, string, etc."""
|
"""Follow a call is following a function, variable, string, etc."""
|
||||||
path = call.generate_call_path()
|
path = call.generate_call_path()
|
||||||
scope = call.get_parent_until(pr.IsScope)
|
|
||||||
return follow_call_path(path, scope, call.start_pos)
|
# find the statement of the Scope
|
||||||
|
s = call
|
||||||
|
while not s.parent.isinstance(pr.IsScope):
|
||||||
|
s = s.parent
|
||||||
|
return follow_call_path(path, s.parent, s.start_pos)
|
||||||
|
|
||||||
|
|
||||||
def follow_call_path(path, scope, position):
|
def follow_call_path(path, scope, position):
|
||||||
|
|||||||
@@ -253,7 +253,7 @@ class Scope(Simple, IsScope):
|
|||||||
self.start_pos[0], self.end_pos[0])
|
self.start_pos[0], self.end_pos[0])
|
||||||
|
|
||||||
|
|
||||||
class Module(object):
|
class Module(IsScope):
|
||||||
""" For isinstance checks. fast_parser.Module also inherits from this. """
|
""" For isinstance checks. fast_parser.Module also inherits from this. """
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user