jcs's openbsd hax
openbsd

Fix the size caluation for left-right windows used to spread out cells horizontally evenly. From Michael Grant in GitHub issue 4724.

nicm 00e89ea5 7f8e849e

+4 -10
+4 -10
usr.bin/tmux/layout.c
··· 1 - /* $OpenBSD: layout.c,v 1.52 2024/12/17 08:40:24 nicm Exp $ */ 1 + /* $OpenBSD: layout.c,v 1.53 2025/12/03 07:35:32 nicm Exp $ */ 2 2 3 3 /* 4 4 * Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com> ··· 1100 1100 layout_spread_cell(struct window *w, struct layout_cell *parent) 1101 1101 { 1102 1102 struct layout_cell *lc; 1103 - struct style *sb_style = &w->active->scrollbar_style; 1104 1103 u_int number, each, size, this, remainder; 1105 - int change, changed, status, scrollbars; 1104 + int change, changed, status; 1106 1105 1107 1106 number = 0; 1108 1107 TAILQ_FOREACH (lc, &parent->cells, entry) ··· 1110 1109 if (number <= 1) 1111 1110 return (0); 1112 1111 status = options_get_number(w->options, "pane-border-status"); 1113 - scrollbars = options_get_number(w->options, "pane-scrollbars"); 1114 1112 1115 - if (parent->type == LAYOUT_LEFTRIGHT) { 1116 - if (scrollbars) 1117 - size = parent->sx - sb_style->width + sb_style->pad; 1118 - else 1119 - size = parent->sx; 1120 - } 1113 + if (parent->type == LAYOUT_LEFTRIGHT) 1114 + size = parent->sx; 1121 1115 else if (parent->type == LAYOUT_TOPBOTTOM) { 1122 1116 if (layout_add_horizontal_border(w, parent, status)) 1123 1117 size = parent->sy - 1;