aboutsummaryrefslogtreecommitdiff
path: root/src/server/memory_index.odin
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-08-31 13:43:00 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-08-31 13:43:00 -0400
commit37c4ec0b95cdfac3000ddd3fb95b0466b3dbc0b7 (patch)
tree85be48bc2313b9f9df4a7c2fb132e5b9ee10ac07 /src/server/memory_index.odin
parent50a3fd1799c23074452802dcd51fef5c4e03d525 (diff)
Construct current package from the current file when searching index
Diffstat (limited to 'src/server/memory_index.odin')
-rw-r--r--src/server/memory_index.odin2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/memory_index.odin b/src/server/memory_index.odin
index bb4d13c..ad5fedc 100644
--- a/src/server/memory_index.odin
+++ b/src/server/memory_index.odin
@@ -44,7 +44,6 @@ memory_index_fuzzy_search :: proc(
index: ^MemoryIndex,
name: string,
pkgs: []string,
- current_pkg: string,
current_file: string,
resolve_fields := false,
) -> (
@@ -56,6 +55,7 @@ memory_index_fuzzy_search :: proc(
fuzzy_matcher := common.make_fuzzy_matcher(name)
top := 100
+ current_pkg := get_package_from_filepath(current_file)
for pkg in pkgs {
if pkg, ok := index.collection.packages[pkg]; ok {