From df3ab87964fc52c6f44b2bbe014c8bec202d0528 Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 22 Mar 2017 07:16:54 +0000 Subject: Add support for the strikethrough attribute (SGR 9), using the new smxx terminfo capability. This means there are now nine attribute bits, so anything above 0xff uses an extended cell. --- grid.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'grid.c') diff --git a/grid.c b/grid.c index 424d272a..43145eae 100644 --- a/grid.c +++ b/grid.c @@ -85,6 +85,8 @@ grid_need_extended_cell(const struct grid_cell_entry *gce, { if (gce->flags & GRID_FLAG_EXTENDED) return (1); + if (gc->attr > 0xff) + return (1); if (gc->data.size != 1 || gc->data.width != 1) return (1); if ((gc->fg & COLOUR_FLAG_RGB) ||(gc->bg & COLOUR_FLAG_RGB)) @@ -687,7 +689,8 @@ grid_string_cells_code(const struct grid_cell *lastgc, { GRID_ATTR_UNDERSCORE, 4 }, { GRID_ATTR_BLINK, 5 }, { GRID_ATTR_REVERSE, 7 }, - { GRID_ATTR_HIDDEN, 8 } + { GRID_ATTR_HIDDEN, 8 }, + { GRID_ATTR_STRIKETHROUGH, 9 } }; n = 0; -- cgit