Do not loop forever if a pane ends up with borders the wrong way round.

This commit is contained in:
nicm
2026-06-19 18:28:18 +00:00
parent 6c46358be8
commit c93e2f2332

View File

@@ -131,6 +131,8 @@ window_visible_ranges(struct window_pane *base_wp, int px, int py, u_int width,
for (i = 0; i < r->used; i++) {
ri = &r->ranges[i];
if (ri->nx == 0)
continue;
if (no_border) {
lb = wp->xoff;
rb = wp->xoff + (int)wp->sx - 1;
@@ -159,6 +161,8 @@ window_visible_ranges(struct window_pane *base_wp, int px, int py, u_int width,
rb = w->sx - 1;
else if (!no_border && rb > (int)w->sx)
rb = w->sx - 1;
if (lb > rb)
continue;
sx = ri->px;
ex = sx + ri->nx - 1;