Merge branch 'master' into floating_panes

This commit is contained in:
Dane Jensen
2026-06-10 12:47:50 -07:00
19 changed files with 451 additions and 173 deletions

View File

@@ -715,7 +715,7 @@ screen_redraw_draw_pane_status(struct screen_redraw_ctx *ctx)
/* Right not visible. */
l = 0;
x = xoff - ctx->ox;
width = size - x;
width = ctx->sx - x;
}
r = tty_check_overlay_range(tty, x, yoff, width);
@@ -727,8 +727,7 @@ screen_redraw_draw_pane_status(struct screen_redraw_ctx *ctx)
if (ri->nx == 0)
continue;
tty_draw_line(tty, s, l + (ri->px - x), 0, ri->nx,
ri->px, yoff - ctx->oy,
&grid_default_cell, NULL);
ri->px, yoff - ctx->oy, NULL);
}
}
tty_cursor(tty, 0, 0);
@@ -1046,7 +1045,7 @@ screen_redraw_draw_borders_cell(struct screen_redraw_ctx *ctx, u_int i, u_int j)
screen_redraw_draw_border_arrows(ctx, i, j, cell_type, wp, active, &gc);
tty_cell(tty, &gc, &grid_default_cell, NULL, NULL);
tty_cell(tty, &gc, NULL);
if (isolates)
tty_puts(tty, START_ISOLATE);
}
@@ -1106,10 +1105,8 @@ screen_redraw_draw_status(struct screen_redraw_ctx *ctx)
y = 0;
else
y = c->tty.sy - ctx->statuslines;
for (i = 0; i < ctx->statuslines; i++) {
tty_draw_line(tty, s, 0, i, UINT_MAX, 0, y + i,
&grid_default_cell, NULL);
}
for (i = 0; i < ctx->statuslines; i++)
tty_draw_line(tty, s, 0, i, UINT_MAX, 0, y + i, NULL);
}
/*
@@ -1304,6 +1301,7 @@ screen_redraw_draw_pane(struct screen_redraw_ctx *ctx, struct window_pane *wp)
struct screen *s = wp->screen;
struct colour_palette *palette = &wp->palette;
struct grid_cell defaults;
struct tty_style_ctx style_ctx;
u_int j, k, woy, wx, wy, py, width;
struct visible_ranges *r;
struct visible_range *ri;
@@ -1378,10 +1376,15 @@ screen_redraw_draw_pane(struct screen_redraw_ctx *ctx, struct window_pane *wp)
width = ctx->sx - wx;
}
/* Set up the default style. */
tty_default_colours(&defaults, wp);
style_ctx.defaults = &defaults;
style_ctx.palette = palette;
style_ctx.hyperlinks = s->hyperlinks;
/* Get visible ranges of line before we draw it. */
r = tty_check_overlay_range(tty, wx, wy, width);
r = screen_redraw_get_visible_ranges(wp, wx, wy, width, r);
tty_default_colours(&defaults, wp);
for (k = 0; k < r->used; k++) {
ri = &r->ranges[k];
if (ri->nx == 0)
@@ -1392,7 +1395,7 @@ screen_redraw_draw_pane(struct screen_redraw_ctx *ctx, struct window_pane *wp)
ri->px + (int)ctx->ox - wp->xoff, j, ri->nx,
ri->px, py, ri->nx);
tty_draw_line(tty, s, ri->px + (int)ctx->ox - wp->xoff,
j, ri->nx, ri->px, py, &defaults, palette);
j, ri->nx, ri->px, py, &style_ctx);
}
}
@@ -1569,16 +1572,14 @@ screen_redraw_draw_scrollbar(struct screen_redraw_ctx *ctx,
if ((sb_pos == PANE_SCROLLBARS_LEFT &&
i >= sb_w && i < sb_w + sb_pad) ||
(sb_pos == PANE_SCROLLBARS_RIGHT &&
i < sb_pad)) {
tty_cell(tty, &grid_default_cell,
&grid_default_cell, NULL, NULL);
} else {
i < sb_pad))
tty_cell(tty, &grid_default_cell, NULL);
else {
if (j >= slider_y && j < slider_y + slider_h)
gcp = &slgc;
else
gcp = &gc;
tty_cell(tty, gcp, &grid_default_cell, NULL,
NULL);
tty_cell(tty, gcp, NULL);
}
}
}