-/* $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>
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) {