mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-25 01:38:36 +08:00
fixes for goto
This commit is contained in:
+1
-1
@@ -294,7 +294,7 @@ class Script(object):
|
||||
defs, search_name = evaluate.goto(stmt)
|
||||
definitions = follow_inexistent_imports(defs)
|
||||
if isinstance(user_stmt, pr.Statement):
|
||||
if user_stmt.get_assignment_calls().start_pos > self.pos:
|
||||
if user_stmt.get_commands()[0].start_pos > self.pos:
|
||||
# The cursor must be after the start, otherwise the
|
||||
# statement is just an assignee.
|
||||
definitions = [user_stmt]
|
||||
|
||||
@@ -1128,7 +1128,7 @@ class NamePart(str):
|
||||
|
||||
@property
|
||||
def start_pos(self):
|
||||
offset = self.parent.module.line_offset
|
||||
offset = self.parent._sub_module.line_offset
|
||||
return offset + self._start_pos[0], self._start_pos[1]
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user