From 30e06e9d85a54648dd11b107f467c608f153f62c Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 3 Jun 2022 08:09:16 +0000 Subject: [PATCH] Do not unintentionally turn off all mouse mode when button is also present. --- tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tty.c b/tty.c index ea10e61e..49cf9795 100644 --- a/tty.c +++ b/tty.c @@ -814,7 +814,7 @@ tty_update_mode(struct tty *tty, int mode, struct screen *s) tty_puts(tty, "\033[?1006h"); if (mode & MODE_MOUSE_ALL) tty_puts(tty, "\033[?1000h\033[?1002h\033[?1003h"); - if (mode & MODE_MOUSE_BUTTON) + else if (mode & MODE_MOUSE_BUTTON) tty_puts(tty, "\033[?1000h\033[?1002h"); else if (mode & MODE_MOUSE_STANDARD) tty_puts(tty, "\033[?1000h");