From b0c1cefeda9d11910dd4a174e82c9f57ff8bc495 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 12 Jan 2018 16:43:47 +0000 Subject: [PATCH] Do not collect top-bit-set characters in case they need to be replaced. --- screen-write.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/screen-write.c b/screen-write.c index 1687e8c8..75080d8b 100644 --- a/screen-write.c +++ b/screen-write.c @@ -1297,10 +1297,12 @@ screen_write_collect_end(struct screen_write_ctx *ctx) grid_view_get_cell(s->grid, xx, s->cy, &gc); if (~gc.flags & GRID_FLAG_PADDING) break; - grid_view_set_cell(s->grid, xx, s->cy, &grid_default_cell); + grid_view_set_cell(s->grid, xx, s->cy, + &grid_default_cell); } if (gc.data.width > 1) - grid_view_set_cell(s->grid, xx, s->cy, &grid_default_cell); + grid_view_set_cell(s->grid, xx, s->cy, + &grid_default_cell); } memcpy(&gc, &ci->gc, sizeof gc); @@ -1333,7 +1335,7 @@ screen_write_collect_add(struct screen_write_ctx *ctx, */ collect = 1; - if (gc->data.width != 1 || gc->data.size != 1) + if (gc->data.width != 1 || gc->data.size != 1 || *gc->data.data >= 0x7f) collect = 0; else if (gc->attr & GRID_ATTR_CHARSET) collect = 0;