From 90f2a417af1d6a15435571e6512d75b7ab373c58 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 12 May 2017 13:29:05 +0000 Subject: Need to clear tty context before using it. --- screen-write.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'screen-write.c') diff --git a/screen-write.c b/screen-write.c index 6631ab56..ab0d1341 100644 --- a/screen-write.c +++ b/screen-write.c @@ -387,6 +387,8 @@ screen_write_initctx(struct screen_write_ctx *ctx, struct tty_ctx *ttyctx) { struct screen *s = ctx->s; + memset(ttyctx, 0, sizeof *ttyctx); + ttyctx->wp = ctx->wp; ttyctx->ocx = s->cx; -- cgit From 2bff5e7867b4849019df04d77ecade300c6e3dce Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Fri, 12 May 2017 16:16:16 +0100 Subject: ECH needs to use background colour. --- screen-write.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'screen-write.c') 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; -- cgit