diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-05-12 10:50:12 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-05-12 10:50:12 +0000 |
commit | eb98e4d3a1e7872cdeffc3a7a37a5b096845c49d (patch) | |
tree | f330cb502297da6cd13055ba4e7f32b2b065fb05 /usr.bin/tmux | |
parent | eba2d186ce080b96f347951078d77ddfde437222 (diff) |
ECH needs to use background colour.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r-- | usr.bin/tmux/input.c | 5 | ||||
-rw-r--r-- | usr.bin/tmux/screen-write.c | 5 | ||||
-rw-r--r-- | usr.bin/tmux/tmux.h | 4 | ||||
-rw-r--r-- | usr.bin/tmux/tty.c | 4 |
4 files changed, 10 insertions, 8 deletions
diff --git a/usr.bin/tmux/input.c b/usr.bin/tmux/input.c index 15497e6386f..0543c0c2731 100644 --- a/usr.bin/tmux/input.c +++ b/usr.bin/tmux/input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: input.c,v 1.119 2017/04/22 08:33:28 nicm Exp $ */ +/* $OpenBSD: input.c,v 1.120 2017/05/12 10:50:11 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -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/usr.bin/tmux/screen-write.c b/usr.bin/tmux/screen-write.c index 1444a4a7fed..d7bfd512378 100644 --- a/usr.bin/tmux/screen-write.c +++ b/usr.bin/tmux/screen-write.c @@ -1,4 +1,4 @@ -/* $OpenBSD: screen-write.c,v 1.120 2017/05/11 11:39:30 nicm Exp $ */ +/* $OpenBSD: screen-write.c,v 1.121 2017/05/12 10:50:11 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -606,7 +606,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; @@ -623,6 +623,7 @@ 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); diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h index 1adede81a3f..60d402e60c1 100644 --- a/usr.bin/tmux/tmux.h +++ b/usr.bin/tmux/tmux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.h,v 1.765 2017/05/12 10:45:38 nicm Exp $ */ +/* $OpenBSD: tmux.h,v 1.766 2017/05/12 10:50:11 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -1997,7 +1997,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); diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index efce80f7265..9ec5d504a9e 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.274 2017/05/12 10:49:04 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.275 2017/05/12 10:50:11 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -1035,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); |