diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2011-04-09 07:48:09 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2011-04-09 07:48:09 +0000 |
commit | d0d3977662d32db8a559170c74ee0782688ba0e3 (patch) | |
tree | 01e8e7949328dd86443da5051cd605e7367ad52d /usr.bin/tmux/tty.c | |
parent | 6432f43859cddf98ea5875c374fcf9ac902f42b5 (diff) |
If the terminal supports sitm for italics, use it instead of standout
(smso). From Tiago Resende.
Diffstat (limited to 'usr.bin/tmux/tty.c')
-rw-r--r-- | usr.bin/tmux/tty.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index 239cc87d2fa..d26af944bd6 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.103 2011/03/27 20:36:19 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.104 2011/04/09 07:48:08 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) |