From 7499d925da697498b7ee69b0effaa8b5176a50bf Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 12 May 2025 09:50:00 +0000 Subject: [PATCH] Do not downgrade styled underscores to standard underscore if the terminal does not support them, this matches what would happen if the application tried to use them on a terminal without support. --- tty.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tty.c b/tty.c index 04ebc72d..0fd0ce71 100644 --- a/tty.c +++ b/tty.c @@ -2634,8 +2634,7 @@ tty_attributes(struct tty *tty, const struct grid_cell *gc, if (changed & GRID_ATTR_ITALICS) tty_set_italics(tty); if (changed & GRID_ATTR_ALL_UNDERSCORE) { - if ((changed & GRID_ATTR_UNDERSCORE) || - !tty_term_has(tty->term, TTYC_SMULX)) + if (changed & GRID_ATTR_UNDERSCORE) tty_putcode(tty, TTYC_SMUL); else if (changed & GRID_ATTR_UNDERSCORE_2) tty_putcode_i(tty, TTYC_SMULX, 2);