fix: expand/shrink_centered_view should increment in steps of 2

This commit is contained in:
CJ van den Berg 2026-02-11 17:48:11 +01:00
parent 1034872e8f
commit a7016f6229
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -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();
}