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.
This commit is contained in:
2Shirt 2023-07-05 15:48:31 -07:00
parent 408a0c6114
commit d101ec627f
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -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: