goto_definition on a name definition (statement) should land on the statement.
This commit is contained in:
1 parent
d8067a7286
commit
c4c3ef5a21
2 files changed
+14
-3
No files matched your search
@@ -454,6 +454,9 @@ class Evaluator(object):
|
||||
return types
|
||||
|
||||
def goto_definition(self, name):
|
||||
def_ = name.get_definition()
|
||||
if def_.type == 'expr_stmt' and name in def_.get_defined_names():
|
||||
return self.eval_statement(def_, name)
|
||||
call = call_of_name(name)
|
||||
return self.eval_element(call)
|
||||
|
||||
|
||||
Reference in new issue
Block a user