diff options
author | 2017-03-22 07:16:54 +0000 | |
---|---|---|
committer | 2017-03-22 07:16:54 +0000 | |
commit | 1779e050886c6a5dc98cb54e281b78d8f717b134 (patch) | |
tree | 2495992022ccd229c912df1b2290d4d796bc5b3f /usr.bin/tmux/tty.c | |
parent | zap some historical notes and an out of date url; (diff) | |
download | wireguard-openbsd-1779e050886c6a5dc98cb54e281b78d8f717b134.tar.xz wireguard-openbsd-1779e050886c6a5dc98cb54e281b78d8f717b134.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 'usr.bin/tmux/tty.c')
-rw-r--r-- | usr.bin/tmux/tty.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index eea73ba36c3..e692c18c7b2 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.254 2017/03/15 15:22:14 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.255 2017/03/22 07:16:54 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -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); } |