mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
Break the colour palette into a struct rather than just a single array
and use that to support the OSC palette-setting sequences in popups. Also add a pane-colours array option to specify the defaults. GitHub issue 2815.
This commit is contained in:
@ -800,12 +800,13 @@ screen_redraw_draw_status(struct screen_redraw_ctx *ctx)
|
||||
static void
|
||||
screen_redraw_draw_pane(struct screen_redraw_ctx *ctx, struct window_pane *wp)
|
||||
{
|
||||
struct client *c = ctx->c;
|
||||
struct window *w = c->session->curw->window;
|
||||
struct tty *tty = &c->tty;
|
||||
struct screen *s;
|
||||
struct grid_cell defaults;
|
||||
u_int i, j, top, x, y, width;
|
||||
struct client *c = ctx->c;
|
||||
struct window *w = c->session->curw->window;
|
||||
struct tty *tty = &c->tty;
|
||||
struct screen *s = wp->screen;
|
||||
struct colour_palette *palette = &wp->palette;
|
||||
struct grid_cell defaults;
|
||||
u_int i, j, top, x, y, width;
|
||||
|
||||
log_debug("%s: %s @%u %%%u", __func__, c->name, w->id, wp->id);
|
||||
|
||||
@ -815,8 +816,6 @@ screen_redraw_draw_pane(struct screen_redraw_ctx *ctx, struct window_pane *wp)
|
||||
top = ctx->statuslines;
|
||||
else
|
||||
top = 0;
|
||||
|
||||
s = wp->screen;
|
||||
for (j = 0; j < wp->sy; j++) {
|
||||
if (wp->yoff + j < ctx->oy || wp->yoff + j >= ctx->oy + ctx->sy)
|
||||
continue;
|
||||
@ -849,7 +848,6 @@ screen_redraw_draw_pane(struct screen_redraw_ctx *ctx, struct window_pane *wp)
|
||||
__func__, c->name, wp->id, i, j, x, y, width);
|
||||
|
||||
tty_default_colours(&defaults, wp);
|
||||
tty_draw_line(tty, s, i, j, width, x, y, &defaults,
|
||||
wp->palette);
|
||||
tty_draw_line(tty, s, i, j, width, x, y, &defaults, palette);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user