]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix strike-through attribute support on TTY frames
authorEli Zaretskii <eliz@gnu.org>
Sun, 16 Apr 2023 06:19:15 +0000 (09:19 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sun, 16 Apr 2023 06:19:15 +0000 (09:19 +0300)
* src/term.c (init_tty): Fix setting the strike-through capability
with "smxx".  (Bug#62265)

src/term.c

index d881dee39feab392fc19be4f3a87b29d31cb27e3..8a16ce4e33f087544a49aa75fac9098927fff425 100644 (file)
@@ -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);