aboutsummaryrefslogtreecommitdiff
path: root/tty-keys.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2022-02-16 22:01:11 +0000
committerThomas Adam <thomas@xteddy.org>2022-02-16 22:01:11 +0000
commit722f395e61f1ded4d1d9506688f3240cff933435 (patch)
tree0a65d5cf06c94a87411553905ee6f9227040e529 /tty-keys.c
parentc7c7e875a0f71451564746a20db8d84c418ad7d5 (diff)
parent0027ee13a089efe7d1db1a4cfedb9b801635ded8 (diff)
downloadrtmux-722f395e61f1ded4d1d9506688f3240cff933435.tar.gz
rtmux-722f395e61f1ded4d1d9506688f3240cff933435.tar.bz2
rtmux-722f395e61f1ded4d1d9506688f3240cff933435.zip
Merge branch 'obsd-master' into master
Diffstat (limited to 'tty-keys.c')
-rw-r--r--tty-keys.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tty-keys.c b/tty-keys.c
index 5d950078..30717af3 100644
--- a/tty-keys.c
+++ b/tty-keys.c
@@ -1118,7 +1118,7 @@ tty_keys_mouse(struct tty *tty, const char *buf, size_t len, size_t *size,
/* Type is M for press, m for release. */
sgr_type = ch;
if (sgr_type == 'm')
- b |= 3;
+ b = 3;
/*
* Some terminals (like PuTTY 0.63) mistakenly send
@@ -1126,7 +1126,7 @@ tty_keys_mouse(struct tty *tty, const char *buf, size_t len, size_t *size,
* Discard it before it reaches any program running inside
* tmux.
*/
- if (sgr_type == 'm' && (sgr_b & 64))
+ if (sgr_type == 'm' && MOUSE_WHEEL(sgr_b))
return (-2);
} else
return (-1);