mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 21:56:57 +00:00
ECH needs to use background colour.
This commit is contained in:
14
tty.c
14
tty.c
@ -798,6 +798,7 @@ tty_clear_area(struct tty *tty, const struct window_pane *wp, u_int py,
|
||||
u_int ny, u_int px, u_int nx, u_int bg)
|
||||
{
|
||||
u_int yy;
|
||||
char tmp[64];
|
||||
|
||||
log_debug("%s: %u,%u at %u,%u", __func__, nx, ny, px, py);
|
||||
|
||||
@ -815,6 +816,17 @@ tty_clear_area(struct tty *tty, const struct window_pane *wp, u_int py,
|
||||
tty_putcode(tty, TTYC_ED);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* If we're setting a background colour (so it is not default),
|
||||
* we can use DECFRA.
|
||||
*/
|
||||
if (tty->term_type == TTY_VT420 && bg != 8) {
|
||||
xsnprintf(tmp, sizeof tmp, "\033[32;%u;%u;%u;%u$x",
|
||||
py + 1, px + 1, py + ny, px + nx);
|
||||
tty_puts(tty, tmp);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* Couldn't use an escape sequence, loop over the lines. */
|
||||
@ -1023,7 +1035,7 @@ tty_cmd_deletecharacter(struct tty *tty, const struct tty_ctx *ctx)
|
||||
void
|
||||
tty_cmd_clearcharacter(struct tty *tty, const struct tty_ctx *ctx)
|
||||
{
|
||||
tty_attributes(tty, &grid_default_cell, ctx->wp);
|
||||
tty_default_attributes(tty, ctx->wp, ctx->bg);
|
||||
|
||||
tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy);
|
||||
|
||||
|
Reference in New Issue
Block a user