summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/tty.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2015-02-05 11:46:57 +0000
committernicm <nicm@openbsd.org>2015-02-05 11:46:57 +0000
commitf1830621108cd8cab88a4d836a9dfc94e7db0162 (patch)
tree4756a43ebcd81463e9e5fbad0b906653e0cad870 /usr.bin/tmux/tty.c
parentFix potential NULL pointer dereference. (diff)
downloadwireguard-openbsd-f1830621108cd8cab88a4d836a9dfc94e7db0162.tar.xz
wireguard-openbsd-f1830621108cd8cab88a4d836a9dfc94e7db0162.zip
Reset bracket paste mode on detach.
Diffstat (limited to 'usr.bin/tmux/tty.c')
-rw-r--r--usr.bin/tmux/tty.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c
index a9255811baf..6741eef05f9 100644
--- a/usr.bin/tmux/tty.c
+++ b/usr.bin/tmux/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.172 2015/01/30 12:33:03 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.173 2015/02/05 11:46:57 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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));