diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-08-31 13:04:55 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-08-31 13:04:55 -0400 |
| commit | 50a3fd1799c23074452802dcd51fef5c4e03d525 (patch) | |
| tree | a448af819ee0826220342f71af6d9eb8d486b75b /src/server/completion.odin | |
| parent | 8ee9db53bf77e676afa6ebf9c5a1b5bc6504c627 (diff) | |
Use current package rather than file path to filter private symbols
Diffstat (limited to 'src/server/completion.odin')
| -rw-r--r-- | src/server/completion.odin | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/completion.odin b/src/server/completion.odin index b06c67f..33b30d6 100644 --- a/src/server/completion.odin +++ b/src/server/completion.odin @@ -1035,8 +1035,9 @@ get_selector_completion :: proc( is_incomplete = true pkg := selector.pkg + current_pkg := ast_context.current_package - if searched, ok := fuzzy_search(field, {pkg}, ast_context.fullpath); ok { + if searched, ok := fuzzy_search(field, {pkg}, current_pkg, ast_context.fullpath); ok { for search in searched { symbol := search.symbol @@ -1567,7 +1568,7 @@ get_identifier_completion :: proc( append(&pkgs, ast_context.document_package) append(&pkgs, "$builtin") - if fuzzy_results, ok := fuzzy_search(lookup_name, pkgs[:], ast_context.fullpath); ok { + if fuzzy_results, ok := fuzzy_search(lookup_name, pkgs[:], ast_context.current_package, ast_context.fullpath); ok { for r in fuzzy_results { r := r resolve_unresolved_symbol(ast_context, &r.symbol) |