aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2015-02-06 19:05:56 +0000
committerThomas Adam <thomas@xteddy.org>2015-02-06 19:07:43 +0000
commit833fe5bdee449b04afe8844774be66374e1baf9c (patch)
tree11b21f479421b08f67776c832543becaa0b12fb8 /tty.c
parent93c3fb78a3593afd23e85352213236131dd5958f (diff)
parent313f2263f8bb3336893527f65789f820ba7eaf0f (diff)
downloadrtmux-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.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/tty.c b/tty.c
index 9f57c365..1bb89811 100644
--- a/tty.c
+++ b/tty.c
@@ -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) {