From a7016f6229afc7898f784568d7d14ccca0bbf6be Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Wed, 11 Feb 2026 17:48:11 +0100 Subject: [PATCH] fix: expand/shrink_centered_view should increment in steps of 2 --- src/tui/tui.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tui/tui.zig b/src/tui/tui.zig index 9ef1303..30c70c9 100644 --- a/src/tui/tui.zig +++ b/src/tui/tui.zig @@ -1703,8 +1703,8 @@ const cmds = struct { pub fn expand_centered_view(_: *Self, _: Ctx) Result { const conf = config_mut(); - conf.centered_view_width = conf.centered_view_width + 1; - conf.centered_view_min_screen_width = conf.centered_view_min_screen_width + 1; + conf.centered_view_width = conf.centered_view_width + 2; + conf.centered_view_min_screen_width = conf.centered_view_min_screen_width + 2; try save_config(); resize(); } @@ -1712,8 +1712,8 @@ const cmds = struct { pub fn shrink_centered_view(_: *Self, _: Ctx) Result { const conf = config_mut(); - conf.centered_view_width = conf.centered_view_width - @min(1, conf.centered_view_width); - conf.centered_view_min_screen_width = conf.centered_view_min_screen_width - @min(1, conf.centered_view_min_screen_width); + conf.centered_view_width = conf.centered_view_width -| 2; + conf.centered_view_min_screen_width = conf.centered_view_min_screen_width -| 2; try save_config(); resize(); }