1
0
mirror of https://github.com/tmux/tmux.git synced 2025-04-04 07:08:50 +00:00

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.
This commit is contained in:
nicm 2015-05-19 08:48:37 +00:00
parent 3f4ee98162
commit 2c53b23d59

13
tty.c
View File

@ -507,14 +507,17 @@ tty_update_mode(struct tty *tty, int mode, struct screen *s)
mode &= ~MODE_CURSOR; mode &= ~MODE_CURSOR;
changed = mode ^ tty->mode; changed = mode ^ tty->mode;
if (changed & (MODE_CURSOR|MODE_BLINKING)) { if (changed & MODE_BLINKING) {
if (mode & MODE_CURSOR) { if (tty_term_has(tty->term, TTYC_CVVIS))
if (mode & MODE_BLINKING &&
tty_term_has(tty->term, TTYC_CVVIS))
tty_putcode(tty, TTYC_CVVIS); tty_putcode(tty, TTYC_CVVIS);
else else
tty_putcode(tty, TTYC_CNORM); tty_putcode(tty, TTYC_CNORM);
} else changed |= MODE_CURSOR;
}
if (changed & MODE_CURSOR) {
if (mode & MODE_CURSOR)
tty_putcode(tty, TTYC_CNORM);
else
tty_putcode(tty, TTYC_CIVIS); tty_putcode(tty, TTYC_CIVIS);
} }
if (s != NULL && tty->cstyle != s->cstyle) { if (s != NULL && tty->cstyle != s->cstyle) {