Skip to content

Commit

Permalink
Go to declaration: allow qualified decl in current module
Browse files Browse the repository at this point in the history
  • Loading branch information
mvoidex committed Mar 29, 2013
1 parent 6ba1db2 commit 70e727f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions autocomplete.py
Expand Up @@ -644,7 +644,7 @@ def run(self, edit):
if current_file_name in files:
cur_info = files[current_file_name]

if not module_word:
if not module_word or module_word == cur_info.name:
# this module declarations
candidates.extend([m.declarations[ident] for m in modules_dict if symbols.is_this_module(cur_info, m) and ident in m.declarations])
if not candidates:
Expand All @@ -655,7 +655,7 @@ def run(self, edit):
candidates.extend([m.declarations[ident] for m in modules_dict if symbols.is_imported_module(cur_info, m, module_word) and ident in m.declarations])
if not candidates:
# show all possible candidates
candidates.extend([m.declarations[ident] for m in modules_dict if ident in declarations])
candidates.extend([m.declarations[ident] for m in modules_dict if ident in m.declarations])

# No info about imports for this file, just add all declarations
else:
Expand Down
2 changes: 1 addition & 1 deletion util.py
Expand Up @@ -51,7 +51,7 @@ def refine_decl(decl):
load_docs(decl)

if decl.what == 'declaration':
decl_detailed = symbol_info(decl.module.name, decl.name)
decl_detailed = ghci.ghci_info(decl.module.name, decl.name)
if decl_detailed:
decl.__dict__.update(decl_detailed.__dict__)

Expand Down

0 comments on commit 70e727f

Please sign in to comment.