From 0e0137677fc31f87d9dddcdfe5eeb4a0a80c271e Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Fri, 6 Feb 2026 13:49:13 +0100 Subject: [PATCH] fix: walk_tree file type should use cached config values --- src/Project.zig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Project.zig b/src/Project.zig index 4ba6bd5..4c9c8c1 100644 --- a/src/Project.zig +++ b/src/Project.zig @@ -600,12 +600,13 @@ pub fn walk_tree_entry(self: *Self, m: tp.message) OutOfMemoryError!void { tp.extract(&file_color), }) catch return)) return; const mtime = (@as(i128, @intCast(mtime_high)) << 64) | @as(i128, @intCast(mtime_low)); + const ft = file_type_config.get(file_type) catch null; self.longest_file_path = @max(self.longest_file_path, file_path.len); (try self.pending.addOne(self.allocator)).* = .{ .path = try self.allocator.dupe(u8, file_path), - .type = file_type, - .icon = file_icon, + .type = if (ft) |ft_| ft_.name else try self.allocator.dupe(u8, file_type), + .icon = if (ft) |ft_| ft_.icon orelse &.{} else try self.allocator.dupe(u8, file_icon), .color = @intCast(file_color), .mtime = mtime, };