Support for extended underline styles on terminals which offer them,

enabled by adding the Smulx capability with terminal-overrides (add
something like ',vte*:Smulx=\E[4\:%p1%dm'). GitHub issue 1492.
This commit is contained in:
nicm
2018-10-18 07:57:57 +00:00
parent f7c85f3ed8
commit bc0e527f32
7 changed files with 162 additions and 43 deletions

15
tty.c
View File

@ -1832,8 +1832,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) {