From 16bdd970dcc68e50f26c512b3ead628b9b899c88 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 20 Jan 2015 08:18:04 +0000 Subject: Support blinking cursor mode, both the xterm CSI ?12 h/l and (the backwards) screen CSI 34 h/l. From Guanpeng Xu. --- tty.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'tty.c') diff --git a/tty.c b/tty.c index 9f57c365..2ff2fccc 100644 --- a/tty.c +++ b/tty.c @@ -482,10 +482,14 @@ tty_update_mode(struct tty *tty, int mode, struct screen *s) mode &= ~MODE_CURSOR; changed = mode ^ tty->mode; - if (changed & MODE_CURSOR) { - if (mode & MODE_CURSOR) - tty_putcode(tty, TTYC_CNORM); - else + 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 tty_putcode(tty, TTYC_CIVIS); } if (tty->cstyle != s->cstyle) { -- cgit