aboutsummaryrefslogtreecommitdiff
path: root/tty.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 /tty.c
parent04e17a7e110bb0c70bc917b340aedd94fa60891f (diff)
downloadrtmux-df3ab87964fc52c6f44b2bbe014c8bec202d0528.tar.gz
rtmux-df3ab87964fc52c6f44b2bbe014c8bec202d0528.tar.bz2
rtmux-df3ab87964fc52c6f44b2bbe014c8bec202d0528.zip
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 'tty.c')
-rw-r--r--tty.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tty.c b/tty.c
index 03e4686b..8792da70 100644
--- a/tty.c
+++ b/tty.c
@@ -1557,7 +1557,7 @@ tty_attributes(struct tty *tty, const struct grid_cell *gc,
const struct window_pane *wp)
{
struct grid_cell *tc = &tty->cell, gc2;
- u_char changed;
+ int changed;
/* Ignore cell if it is the same as the last one. */
if (wp != NULL &&
@@ -1627,6 +1627,8 @@ tty_attributes(struct tty *tty, const struct grid_cell *gc,
}
if (changed & GRID_ATTR_HIDDEN)
tty_putcode(tty, TTYC_INVIS);
+ if (changed & GRID_ATTR_STRIKETHROUGH)
+ tty_putcode(tty, TTYC_SMXX);
if ((changed & GRID_ATTR_CHARSET) && tty_use_acs(tty))
tty_putcode(tty, TTYC_SMACS);
}