From aec53f2dd6f1f934c068cc509470e64b6b66c697 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 16 Mar 2020 09:18:48 +0000 Subject: Turn off mouse mode 1003 as well as the rest when exiting. --- usr.bin/tmux/tty.c | 14 +++++++++----- 1 file 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 @@ -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) { -- cgit v1.2.3