summaryrefslogtreecommitdiff
path: root/usr.bin/tmux
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2020-03-16 09:18:48 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2020-03-16 09:18:48 +0000
commitaec53f2dd6f1f934c068cc509470e64b6b66c697 (patch)
treeb640a341a719888f6a7faf7ca443fd434093a9e8 /usr.bin/tmux
parent99b446f0e7fab396a6f90b5d221de123beaa49ca (diff)
Turn off mouse mode 1003 as well as the rest when exiting.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r--usr.bin/tmux/tty.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c
index b905213022b..08cb0911982 100644
--- a/usr.bin/tmux/tty.c
+++ b/usr.bin/tmux/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.342 2020/01/29 15:07:49 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.343 2020/03/16 09:18:47 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -330,8 +330,10 @@ tty_start_tty(struct tty *tty)
log_debug("%s: using UTF-8 for ACS", c->name);
tty_putcode(tty, TTYC_CNORM);
- if (tty_term_has(tty->term, TTYC_KMOUS))
- tty_puts(tty, "\033[?1000l\033[?1002l\033[?1006l\033[?1005l");
+ if (tty_term_has(tty->term, TTYC_KMOUS)) {
+ tty_puts(tty, "\033[?1000l\033[?1002l\033[?1003l");
+ tty_puts(tty, "\033[?1006l\033[?1005l");
+ }
if (tty_term_flag(tty->term, TTYC_XT)) {
if (options_get_number(global_options, "focus-events")) {
@@ -404,8 +406,10 @@ tty_stop_tty(struct tty *tty)
tty_raw(tty, tty_term_string(tty->term, TTYC_CR));
tty_raw(tty, tty_term_string(tty->term, TTYC_CNORM));
- if (tty_term_has(tty->term, TTYC_KMOUS))
- tty_raw(tty, "\033[?1000l\033[?1002l\033[?1006l\033[?1005l");
+ if (tty_term_has(tty->term, TTYC_KMOUS)) {
+ tty_raw(tty, "\033[?1000l\033[?1002l\033[?1003l");
+ tty_raw(tty, "\033[?1006l\033[?1005l");
+ }
if (tty_term_flag(tty->term, TTYC_XT)) {
if (tty->flags & TTY_FOCUS) {