Correctly clip left of panes.

This commit is contained in:
Nicholas Marriott
2026-06-21 20:22:28 +01:00
parent 619f3d3156
commit 1c579d7ef1
7 changed files with 81 additions and 6 deletions

View File

@@ -358,11 +358,11 @@ redraw_pane_to_scene(struct redraw_build_ctx *bctx, struct window_pane *wp,
top = wp->yoff - 1;
bottom = wp->yoff + wp->sy;
if (left < 0 && wx <= 0)
if (left < 0 && wx < 0)
return (0);
if (right > (int)bctx->w->sx && wx >= (int)bctx->w->sx)
return (0);
if (top < 0 && wy <= 0)
if (top < 0 && wy < 0)
return (0);
if (bottom > (int)bctx->w->sy && wy >= (int)bctx->w->sy)
return (0);
@@ -685,11 +685,11 @@ redraw_mark_pane_borders(struct redraw_build_ctx *bctx, struct window_pane *wp,
if (floating) {
if (left < 0)
left = 1;
left = 0;
if (right > (int)bctx->w->sx)
right = (int)bctx->w->sx - 1;
if (top < 0)
top = 1;
top = 0;
if (bottom > (int)bctx->w->sy)
bottom = (int)bctx->w->sy - 1;
} else {