1
0
forked from VimPlug/jedi

get_code in Definition.description should not return first prefix.

This commit is contained in:
Dave Halter
2014-11-21 15:33:38 +01:00
parent f604066288
commit eb0bfb4381
4 changed files with 22 additions and 5 deletions

View File

@@ -443,6 +443,10 @@ class Evaluator(object):
return self.eval_element(call)
def goto(self, name):
stmt = name.parent
if isinstance(stmt, pr.ExprStmt) and name in stmt.get_defined_names():
return [name]
scope = name.get_parent_scope()
if pr.is_node(name.parent, 'trailer'):
call = call_of_name(name, cut_own_trailer=True)