From 78b29c321e289b19e5b29b7f22fc58e8a62ccd29 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Thu, 9 Oct 2025 14:33:09 +0200 Subject: [PATCH] fix: don't render color for black or white file type icons in tabs --- src/tui/status/tabs.zig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tui/status/tabs.zig b/src/tui/status/tabs.zig index 86aaecf..b0ec390 100644 --- a/src/tui/status/tabs.zig +++ b/src/tui/status/tabs.zig @@ -469,10 +469,11 @@ const Tab = struct { const buffer_ = buffer_manager.buffer_from_ref(self.buffer_ref); const is_dirty = if (buffer_) |buffer| buffer.is_dirty() else false; if (self.tab_style.file_type_icon) if (buffer_) |buffer| if (buffer.file_type_icon) |icon| { - if (buffer.file_type_color) |color| + const color_: ?u24 = if (buffer.file_type_color) |color| if (!(color == 0xFFFFFF or color == 0x000000 or color == 0x000001)) color else null else null; + if (color_) |color| btn.plane.set_style(.{ .fg = .{ .color = color } }); _ = btn.plane.putstr(icon) catch {}; - if (buffer.file_type_color) |_| + if (color_) |_| btn.plane.set_style(.{ .fg = fg }); _ = btn.plane.putstr(" ") catch {}; };