From dae2868d1227b95fd076fb4a5efa6256c7245943 Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 27 Jun 2019 15:17:41 +0000 Subject: Add support for underscore colours with Setulc capability, mostly from Kai Moschcau. --- screen-write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'screen-write.c') diff --git a/screen-write.c b/screen-write.c index 174c7a82..631328a3 100644 --- a/screen-write.c +++ b/screen-write.c @@ -36,7 +36,7 @@ static const struct grid_cell *screen_write_combine(struct screen_write_ctx *, const struct utf8_data *, u_int *); static const struct grid_cell screen_write_pad_cell = { - GRID_FLAG_PADDING, 0, 8, 8, { { 0 }, 0, 0, 0 } + GRID_FLAG_PADDING, 0, 8, 8, 0, { { 0 }, 0, 0, 0 } }; struct screen_write_collect_item { -- cgit From 3635b3cd6c3343b2ec3f7173facef8a284e7e613 Mon Sep 17 00:00:00 2001 From: nicm Date: Sat, 6 Jul 2019 20:37:29 +0000 Subject: Correctly clear underscore colour in grid_get_cell1, also fix struct grid_cell to avoid padding. Fixes increased memory use reported by Suraj N Kurapati. --- screen-write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'screen-write.c') diff --git a/screen-write.c b/screen-write.c index 631328a3..943e3044 100644 --- a/screen-write.c +++ b/screen-write.c @@ -36,7 +36,7 @@ static const struct grid_cell *screen_write_combine(struct screen_write_ctx *, const struct utf8_data *, u_int *); static const struct grid_cell screen_write_pad_cell = { - GRID_FLAG_PADDING, 0, 8, 8, 0, { { 0 }, 0, 0, 0 } + { { 0 }, 0, 0, 0 }, 0, GRID_FLAG_PADDING, 0, 8, 8 }; struct screen_write_collect_item { -- cgit From cbe781203f80b0e45cafa44bc3d1635c8d3cf354 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 8 Jul 2019 11:38:14 +0000 Subject: Use the clear history function for the 3J sequence rather than doing it manually. --- screen-write.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'screen-write.c') diff --git a/screen-write.c b/screen-write.c index 943e3044..98cdf158 100644 --- a/screen-write.c +++ b/screen-write.c @@ -1169,11 +1169,7 @@ screen_write_clearscreen(struct screen_write_ctx *ctx, u_int bg) void screen_write_clearhistory(struct screen_write_ctx *ctx) { - struct screen *s = ctx->s; - struct grid *gd = s->grid; - - grid_move_lines(gd, 0, gd->hsize, gd->sy, 8); - gd->hscrolled = gd->hsize = 0; + grid_clear_history(ctx->s->grid); } /* Clear a collected line. */ -- cgit