fix: expand/shrink_centered_view should increment in steps of 2
This commit is contained in:
parent
1034872e8f
commit
a7016f6229
1 changed files with 4 additions and 4 deletions
|
|
@ -1703,8 +1703,8 @@ const cmds = struct {
|
||||||
|
|
||||||
pub fn expand_centered_view(_: *Self, _: Ctx) Result {
|
pub fn expand_centered_view(_: *Self, _: Ctx) Result {
|
||||||
const conf = config_mut();
|
const conf = config_mut();
|
||||||
conf.centered_view_width = conf.centered_view_width + 1;
|
conf.centered_view_width = conf.centered_view_width + 2;
|
||||||
conf.centered_view_min_screen_width = conf.centered_view_min_screen_width + 1;
|
conf.centered_view_min_screen_width = conf.centered_view_min_screen_width + 2;
|
||||||
try save_config();
|
try save_config();
|
||||||
resize();
|
resize();
|
||||||
}
|
}
|
||||||
|
|
@ -1712,8 +1712,8 @@ const cmds = struct {
|
||||||
|
|
||||||
pub fn shrink_centered_view(_: *Self, _: Ctx) Result {
|
pub fn shrink_centered_view(_: *Self, _: Ctx) Result {
|
||||||
const conf = config_mut();
|
const conf = config_mut();
|
||||||
conf.centered_view_width = conf.centered_view_width - @min(1, conf.centered_view_width);
|
conf.centered_view_width = conf.centered_view_width -| 2;
|
||||||
conf.centered_view_min_screen_width = conf.centered_view_min_screen_width - @min(1, conf.centered_view_min_screen_width);
|
conf.centered_view_min_screen_width = conf.centered_view_min_screen_width -| 2;
|
||||||
try save_config();
|
try save_config();
|
||||||
resize();
|
resize();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue