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

This commit is contained in:
Nicholas Marriott
2026-08-28 10:25:42 +01:00
parent 0d7b9e87f4
commit d28c9f613d

View File

@@ -1201,6 +1201,8 @@ screen_redraw_get_visible_ranges(struct window_pane *base_wp, int px,
for (i = 0; i < r->used; i++) {
ri = &r->ranges[i];
if (ri->nx == 0)
continue;
if (w->sb_pos == PANE_SCROLLBARS_LEFT) {
if (wp->xoff > sb_w)
lb = wp->xoff - 1 - sb_w;
@@ -1218,6 +1220,8 @@ screen_redraw_get_visible_ranges(struct window_pane *base_wp, int px,
rb = wp->xoff + wp->sx + sb_w;
if (rb > (int)w->sx)
rb = w->sx - 1;
if (lb > rb)
continue;
sx = ri->px;
ex = sx + ri->nx - 1;