From 594ea40c4e1e9ad35bfffe43001d048076f8808e Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Thu, 30 Jan 2025 14:07:52 +0100 Subject: [PATCH] feat(tabs): don't update tab styles config on startup It is updated when calling open_tabs_style_config, so there is no need to update it on every start. --- src/tui/status/tabs.zig | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/tui/status/tabs.zig b/src/tui/status/tabs.zig index b4c13df..f77ba2e 100644 --- a/src/tui/status/tabs.zig +++ b/src/tui/status/tabs.zig @@ -80,11 +80,7 @@ const TabBar = struct { fn init(allocator: std.mem.Allocator, parent: Plane, event_handler: ?EventHandler) !Self { var w = try WidgetList.createH(allocator, parent, "tabs", .dynamic); w.ctx = w; - const tab_style, const tab_style_bufs: [][]const u8 = if (root.exists_config(Style)) blk: { - const tab_style, const tab_style_bufs = root.read_config(Style, allocator); - root.write_config(tab_style, allocator) catch {}; - break :blk .{ tab_style, tab_style_bufs }; - } else .{ Style{}, &.{} }; + const tab_style, const tab_style_bufs = root.read_config(Style, allocator); return .{ .allocator = allocator, .plane = w.plane,