From ba007b3558120088f22cdb7b62adf897c3dcadf8 Mon Sep 17 00:00:00 2001 From: Techatrix <19954306+Techatrix@users.noreply.github.com> Date: Mon, 17 Oct 2022 20:25:51 +0200 Subject: [PATCH] fix tagStoreCompletionItems --- src/DocumentStore.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/DocumentStore.zig b/src/DocumentStore.zig index 9ec9808..cb82461 100644 --- a/src/DocumentStore.zig +++ b/src/DocumentStore.zig @@ -866,13 +866,13 @@ fn tagStoreCompletionItems(self: DocumentStore, arena: std.mem.Allocator, handle defer tracy_zone.end(); var dependencies = std.ArrayListUnmanaged(Uri){}; - try dependencies.append(self.allocator, handle); - try collectDependencies(self.allocator, self, handle, dependencies); + try dependencies.append(self.allocator, handle.uri); + try collectDependencies(self.allocator, &self, handle, &dependencies); // TODO Better solution for deciding what tags to include var result_set = analysis.CompletionSet{}; - for (dependencies) |uri| { + for (dependencies.items) |uri| { // not every dependency is loaded which results in incomplete completion const hdl = self.handles.get(uri) orelse continue; const curr_set = @field(hdl.document_scope, name);