From ca0a1c69a5673194dcf2ea40096b081f0416f646 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Fri, 20 Feb 2026 19:02:37 +0100 Subject: [PATCH] fix: prevent duplicate files in project file index --- src/Project.zig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Project.zig b/src/Project.zig index 547aade..0869a69 100644 --- a/src/Project.zig +++ b/src/Project.zig @@ -784,6 +784,8 @@ fn loaded(self: *Self, parent: tp.pid_ref) OutOfMemoryError!void { pub fn file_added(self: *Self, file_path: []const u8) OutOfMemoryError!void { for (self.files.items) |file| if (std.mem.eql(u8, file.path, file_path)) return; + for (self.pending.items) |file| + if (std.mem.eql(u8, file.path, file_path)) return; const file_type, const file_icon, const file_color = guess_file_type(file_path); (try self.files.addOne(self.allocator)).* = .{ .path = try self.allocator.dupe(u8, file_path),