diff options
author | Thomas Adam <thomas@xteddy.org> | 2015-02-06 19:05:56 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2015-02-06 19:07:43 +0000 |
commit | 833fe5bdee449b04afe8844774be66374e1baf9c (patch) | |
tree | 11b21f479421b08f67776c832543becaa0b12fb8 /tty.c | |
parent | 93c3fb78a3593afd23e85352213236131dd5958f (diff) | |
parent | 313f2263f8bb3336893527f65789f820ba7eaf0f (diff) | |
download | rtmux-833fe5bdee449b04afe8844774be66374e1baf9c.tar.gz rtmux-833fe5bdee449b04afe8844774be66374e1baf9c.tar.bz2 rtmux-833fe5bdee449b04afe8844774be66374e1baf9c.zip |
Merge branch 'obsd-master'
Conflicts:
cmd-pipe-pane.c
Diffstat (limited to 'tty.c')
-rw-r--r-- | tty.c | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -281,6 +281,8 @@ tty_stop_tty(struct tty *tty) else tty_raw(tty, tty_term_string1(tty->term, TTYC_SS, 0)); } + if (tty->mode & MODE_BRACKETPASTE) + tty_raw(tty, "\033[?2004l"); tty_raw(tty, tty_term_string(tty->term, TTYC_CR)); tty_raw(tty, tty_term_string(tty->term, TTYC_CNORM)); @@ -290,7 +292,7 @@ tty_stop_tty(struct tty *tty) if (tty_term_has(tty->term, TTYC_XT)) { if (tty->flags & TTY_FOCUS) { tty->flags &= ~TTY_FOCUS; - tty_puts(tty, "\033[?1004l"); + tty_raw(tty, "\033[?1004l"); } } @@ -482,10 +484,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) { |