From: nicm Date: Fri, 3 Jun 2022 08:09:16 +0000 (+0000) Subject: Do not unintentionally turn off all mouse mode when button is also present. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5d31b3e46be38dbbd3f1507d5f9e36bacb8f1200;p=openbsd Do not unintentionally turn off all mouse mode when button is also present. --- diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index 15c6095c25e..38305383d46 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.418 2022/03/24 09:05:57 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.419 2022/06/03 08:09:16 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -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");