mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-28 07:56:51 +08:00
Fix goto.
This commit is contained in:
@@ -102,7 +102,7 @@ class Evaluator(object):
|
||||
f = finder.NameFinder(self, scope, name_str, position)
|
||||
scopes = f.scopes(search_global)
|
||||
if is_goto:
|
||||
return f.filter_name(scopes)
|
||||
return f.filter_name(scopes, search_global)
|
||||
return f.find(scopes, search_global)
|
||||
|
||||
@memoize_default(default=[], evaluator_is_first_arg=True)
|
||||
|
||||
@@ -79,7 +79,7 @@ class NameFinder(object):
|
||||
search_str = str(self.name_str)
|
||||
try:
|
||||
names = names_dict[search_str]
|
||||
if not names: # There must be something in there otherwise stop.
|
||||
if not names: # We want names, otherwise stop.
|
||||
return []
|
||||
except KeyError:
|
||||
return []
|
||||
|
||||
Reference in New Issue
Block a user