Merge branch 'floating_panes' into floating_panes_staging

This commit is contained in:
Nicholas Marriott
2026-05-30 12:00:04 +01:00

View File

@@ -2133,8 +2133,8 @@ screen_write_collect_flush_line(struct screen_write_ctx *ctx, u_int y)
struct screen_write_citem *ci, *tmp; struct screen_write_citem *ci, *tmp;
struct screen_write_cline *cl = &s->write_list[y]; struct screen_write_cline *cl = &s->write_list[y];
u_int last = UINT_MAX, items = 0, wsx, wsy; u_int last = UINT_MAX, items = 0, wsx, wsy;
u_int w_start, w_end, w_length, i; u_int w_length, i;
int xoff, yoff, written; int w_start, w_end, xoff, yoff, written;
int r_start, r_end, c_start, c_end; int r_start, r_end, c_start, c_end;
struct tty_ctx ttyctx; struct tty_ctx ttyctx;
struct visible_ranges *r; struct visible_ranges *r;
@@ -2173,16 +2173,18 @@ screen_write_collect_flush_line(struct screen_write_ctx *ctx, u_int y)
c_start = ci->x; c_start = ci->x;
c_end = ci->x + ci->used; c_end = ci->x + ci->used;
if (c_start + xoff > r_end || c_end + xoff < r_start) if (c_start + xoff >= r_end || c_end + xoff <= r_start)
continue; continue;
if (r_start > c_start + xoff) if (r_start > c_start + xoff)
w_start = c_start + (r_start - c_start + xoff); w_start = r_start - xoff;
else else
w_start = c_start; w_start = c_start;
if (c_end + xoff > r_end) if (c_end + xoff > r_end)
w_end = c_end - (c_end + xoff - r_end); w_end = r_end - xoff;
else else
w_end = c_end; w_end = c_end;
if (w_end <= w_start)
continue;
w_length = w_end - w_start; w_length = w_end - w_start;
if (w_length <= 0) if (w_length <= 0)
continue; continue;