summaryrefslogtreecommitdiffstats
path: root/grid.c
diff options
context:
space:
mode:
authornicm <nicm>2017-03-22 07:16:54 +0000
committernicm <nicm>2017-03-22 07:16:54 +0000
commitdf3ab87964fc52c6f44b2bbe014c8bec202d0528 (patch)
tree18acb5eb18fa51e177d47eb5e0e828e0322a69ee /grid.c
parent04e17a7e110bb0c70bc917b340aedd94fa60891f (diff)
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.
Diffstat (limited to 'grid.c')
-rw-r--r--grid.c5
1 files changed, 4 insertions, 1 deletions
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;