From d101ec627f7b9995c3bdc4204563052688a7f434 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 5 Jul 2023 15:48:31 -0700 Subject: [PATCH] Fix off-by-one bug in tmux.fix_layout() If resizing both the title and info groups the second group was starting at a lower initial width. --- scripts/wk/ui/tmux.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/wk/ui/tmux.py b/scripts/wk/ui/tmux.py index 94c4792a..d53c3ba3 100644 --- a/scripts/wk/ui/tmux.py +++ b/scripts/wk/ui/tmux.py @@ -99,8 +99,7 @@ def fix_layout( num_panes = len(data['Panes']) if num_panes < 2 or group not in ('Title', 'Info'): continue - avail_horizontal -= (num_panes - 1) - pane_width, remainder = divmod(avail_horizontal, num_panes) + pane_width, remainder = divmod(avail_horizontal - (num_panes-1), num_panes) for pane_id in data['Panes']: new_width = pane_width if remainder > 0: