diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2011-04-09 07:48:58 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2011-04-09 07:48:58 +0000 |
commit | 75f218dc73a19ac6de9d2270aab43f83c5bb8816 (patch) | |
tree | c42e66152d915a0c8be7722fad21d2064835986a /tty.c | |
parent | 1d00f88757b623977eb82c85b823dc4ca0cc4d62 (diff) | |
download | rtmux-75f218dc73a19ac6de9d2270aab43f83c5bb8816.tar.gz rtmux-75f218dc73a19ac6de9d2270aab43f83c5bb8816.tar.bz2 rtmux-75f218dc73a19ac6de9d2270aab43f83c5bb8816.zip |
If the terminal supports sitm for italics, use it instead of standout
(smso). From Tiago Resende.
Diffstat (limited to 'tty.c')
-rw-r--r-- | tty.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $Id: tty.c,v 1.207 2011-04-06 22:18:05 nicm Exp $ */ +/* $Id: tty.c,v 1.208 2011-04-09 07:48:58 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -1218,7 +1218,12 @@ tty_attributes(struct tty *tty, const struct grid_cell *gc) if (changed & GRID_ATTR_DIM) tty_putcode(tty, TTYC_DIM); if (changed & GRID_ATTR_ITALICS) - tty_putcode(tty, TTYC_SMSO); + { + if (tty_term_has(tty->term, TTYC_SITM)) + tty_putcode(tty, TTYC_SITM); + else + tty_putcode(tty, TTYC_SMSO); + } if (changed & GRID_ATTR_UNDERSCORE) tty_putcode(tty, TTYC_SMUL); if (changed & GRID_ATTR_BLINK) |