summaryrefslogtreecommitdiff
path: root/src/term.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2023-04-16 09:19:15 +0300
committerEli Zaretskii <eliz@gnu.org>2023-04-16 09:19:15 +0300
commit9686b015a0d71d08828afb0cfe6e477bbc4909ae (patch)
treea599719c8e969c23f9bf2418af446582f03c2865 /src/term.c
parent39035fbfc5f6dfa66c9ba14f61a8d1c751d847c0 (diff)
downloademacs-9686b015a0d71d08828afb0cfe6e477bbc4909ae.tar.gz
Fix strike-through attribute support on TTY frames
* src/term.c (init_tty): Fix setting the strike-through capability with "smxx". (Bug#62265)
Diffstat (limited to 'src/term.c')
-rw-r--r--src/term.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/term.c b/src/term.c
index d881dee39fe..8a16ce4e33f 100644
--- a/src/term.c
+++ b/src/term.c
@@ -4163,7 +4163,15 @@ use the Bourne shell command 'TERM=...; export TERM' (C-shell:\n\
tty->TS_enter_alt_charset_mode = tgetstr ("as", address);
tty->TS_exit_alt_charset_mode = tgetstr ("ae", address);
tty->TS_exit_attribute_mode = tgetstr ("me", address);
+#ifdef TERMINFO
+ tty->TS_enter_strike_through_mode = tigetstr ("smxx", address);
+ if (tty->TS_enter_strike_through_mode == (char *) (intptr_t) -1)
+ tty->TS_enter_strike_through_mode = NULL;
+#else
+ /* FIXME: Is calling tgetstr here for non-terminfo case correct,
+ even though "smxx" is more than 2 characters? */
tty->TS_enter_strike_through_mode = tgetstr ("smxx", address);
+#endif
MultiUp (tty) = tgetstr ("UP", address);
MultiDown (tty) = tgetstr ("DO", address);