diff options
author | 2015-05-19 08:48:37 +0000 | |
---|---|---|
committer | 2015-05-19 08:48:37 +0000 | |
commit | ca20acd9ca00cfeb8ab789061ce57e22b988e0e5 (patch) | |
tree | 20281a7df4482ec2c8ca9a0130b97699653ffbdd /usr.bin/tmux/tty.c | |
parent | change names to not conflict with omap intc (diff) | |
download | wireguard-openbsd-ca20acd9ca00cfeb8ab789061ce57e22b988e0e5.tar.xz wireguard-openbsd-ca20acd9ca00cfeb8ab789061ce57e22b988e0e5.zip |
In terminfo, sometimes cvvis implies cnorm and sometimes it doesn't, so
don't assume it does. Fixes missing cursor with emacs-in-tmux-in-tmux.
Diffstat (limited to 'usr.bin/tmux/tty.c')
-rw-r--r-- | usr.bin/tmux/tty.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index 4418d0c4f47..d13a2445ab9 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.182 2015/05/12 22:40:38 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.183 2015/05/19 08:48:37 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -507,14 +507,17 @@ tty_update_mode(struct tty *tty, int mode, struct screen *s) mode &= ~MODE_CURSOR; changed = mode ^ tty->mode; - if (changed & (MODE_CURSOR|MODE_BLINKING)) { - if (mode & MODE_CURSOR) { - if (mode & MODE_BLINKING && - tty_term_has(tty->term, TTYC_CVVIS)) - tty_putcode(tty, TTYC_CVVIS); - else - tty_putcode(tty, TTYC_CNORM); - } else + if (changed & MODE_BLINKING) { + if (tty_term_has(tty->term, TTYC_CVVIS)) + tty_putcode(tty, TTYC_CVVIS); + else + tty_putcode(tty, TTYC_CNORM); + changed |= MODE_CURSOR; + } + if (changed & MODE_CURSOR) { + if (mode & MODE_CURSOR) + tty_putcode(tty, TTYC_CNORM); + else tty_putcode(tty, TTYC_CIVIS); } if (s != NULL && tty->cstyle != s->cstyle) { |