diff options
-rw-r--r-- | CHANGES | 4 | ||||
-rw-r--r-- | grid.c | 2 | ||||
-rw-r--r-- | input.c | 3 | ||||
-rw-r--r-- | screen-write.c | 5 | ||||
-rw-r--r-- | tmux.h | 2 | ||||
-rw-r--r-- | tty.c | 2 |
6 files changed, 12 insertions, 6 deletions
@@ -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. @@ -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); } @@ -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), diff --git a/screen-write.c b/screen-write.c index ab0d1341..0a63e1b6 100644 --- a/screen-write.c +++ b/screen-write.c @@ -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; @@ -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); @@ -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); |