mirror of
https://github.com/tmux/tmux.git
synced 2025-03-26 07:48:47 +00:00
ECH needs to use background colour.
This commit is contained in:
parent
90f2a417af
commit
2bff5e7867
4
CHANGES
4
CHANGES
@ -1,5 +1,9 @@
|
||||
CHANGES FROM 2.4 to 2.5 09 May 2017
|
||||
|
||||
* Fix ECH with a background colour.
|
||||
|
||||
* Do not rely on the terminal not moving the cursor after DL or EL.
|
||||
|
||||
* Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue
|
||||
905.
|
||||
|
||||
|
2
grid.c
2
grid.c
@ -472,7 +472,7 @@ grid_clear(struct grid *gd, u_int px, u_int py, u_int nx, u_int ny, u_int bg)
|
||||
gd->linedata[yy].cellsize = px;
|
||||
continue;
|
||||
}
|
||||
grid_expand_line(gd, yy, px + nx, bg);
|
||||
grid_expand_line(gd, yy, px + nx, 8); /* default bg first */
|
||||
for (xx = px; xx < px + nx; xx++)
|
||||
grid_clear_cell(gd, xx, yy, bg);
|
||||
}
|
||||
|
3
input.c
3
input.c
@ -1308,7 +1308,8 @@ input_csi_dispatch(struct input_ctx *ictx)
|
||||
}
|
||||
break;
|
||||
case INPUT_CSI_ECH:
|
||||
screen_write_clearcharacter(sctx, input_get(ictx, 0, 1, 1));
|
||||
screen_write_clearcharacter(sctx, input_get(ictx, 0, 1, 1),
|
||||
ictx->cell.cell.bg);
|
||||
break;
|
||||
case INPUT_CSI_DCH:
|
||||
screen_write_deletecharacter(sctx, input_get(ictx, 0, 1, 1),
|
||||
|
@ -608,7 +608,7 @@ screen_write_deletecharacter(struct screen_write_ctx *ctx, u_int nx, u_int bg)
|
||||
|
||||
/* Clear nx characters. */
|
||||
void
|
||||
screen_write_clearcharacter(struct screen_write_ctx *ctx, u_int nx)
|
||||
screen_write_clearcharacter(struct screen_write_ctx *ctx, u_int nx, u_int bg)
|
||||
{
|
||||
struct screen *s = ctx->s;
|
||||
struct tty_ctx ttyctx;
|
||||
@ -625,8 +625,9 @@ screen_write_clearcharacter(struct screen_write_ctx *ctx, u_int nx)
|
||||
return;
|
||||
|
||||
screen_write_initctx(ctx, &ttyctx);
|
||||
ttyctx.bg = bg;
|
||||
|
||||
grid_view_clear(s->grid, s->cx, s->cy, nx, 1, 8);
|
||||
grid_view_clear(s->grid, s->cx, s->cy, nx, 1, bg);
|
||||
|
||||
screen_write_collect_flush(ctx, 0);
|
||||
ttyctx.num = nx;
|
||||
|
2
tmux.h
2
tmux.h
@ -1999,7 +1999,7 @@ void screen_write_cursorleft(struct screen_write_ctx *, u_int);
|
||||
void screen_write_alignmenttest(struct screen_write_ctx *);
|
||||
void screen_write_insertcharacter(struct screen_write_ctx *, u_int, u_int);
|
||||
void screen_write_deletecharacter(struct screen_write_ctx *, u_int, u_int);
|
||||
void screen_write_clearcharacter(struct screen_write_ctx *, u_int);
|
||||
void screen_write_clearcharacter(struct screen_write_ctx *, u_int, u_int);
|
||||
void screen_write_insertline(struct screen_write_ctx *, u_int, u_int);
|
||||
void screen_write_deleteline(struct screen_write_ctx *, u_int, u_int);
|
||||
void screen_write_clearline(struct screen_write_ctx *, u_int);
|
||||
|
2
tty.c
2
tty.c
@ -961,7 +961,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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user