diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2018-10-08 13:21:37 +0100 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2018-10-08 13:21:37 +0100 |
commit | 4b9e76aaaa2dffc01a796fe2ee6edafdfce814a9 (patch) | |
tree | 5e18c336cb634abab745aa7d959f14ab5af16430 /tty.c | |
parent | 46847e9b2e048204690e544b8e6ab328b2a33233 (diff) | |
download | rtmux-4b9e76aaaa2dffc01a796fe2ee6edafdfce814a9.tar.gz rtmux-4b9e76aaaa2dffc01a796fe2ee6edafdfce814a9.tar.bz2 rtmux-4b9e76aaaa2dffc01a796fe2ee6edafdfce814a9.zip |
Support for extended underline styles, enabled by adding the Smulx
capability with terminal-overrides (add something like
'vte*:Smulx=\E[4\:%p1%dm'). GitHub issue 1492.
Diffstat (limited to 'tty.c')
-rw-r--r-- | tty.c | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -2163,8 +2163,19 @@ tty_attributes(struct tty *tty, const struct grid_cell *gc, tty_putcode(tty, TTYC_DIM); if (changed & GRID_ATTR_ITALICS) tty_set_italics(tty); - if (changed & GRID_ATTR_UNDERSCORE) - tty_putcode(tty, TTYC_SMUL); + if (changed & GRID_ATTR_ALL_UNDERSCORE) { + if ((changed & GRID_ATTR_UNDERSCORE) || + !tty_term_has(tty->term, TTYC_SMULX)) + tty_putcode(tty, TTYC_SMUL); + else if (changed & GRID_ATTR_UNDERSCORE_2) + tty_putcode1(tty, TTYC_SMULX, 2); + else if (changed & GRID_ATTR_UNDERSCORE_3) + tty_putcode1(tty, TTYC_SMULX, 3); + else if (changed & GRID_ATTR_UNDERSCORE_4) + tty_putcode1(tty, TTYC_SMULX, 4); + else if (changed & GRID_ATTR_UNDERSCORE_5) + tty_putcode1(tty, TTYC_SMULX, 5); + } if (changed & GRID_ATTR_BLINK) tty_putcode(tty, TTYC_BLINK); if (changed & GRID_ATTR_REVERSE) { |