diff options
author | nicm <nicm> | 2022-02-16 18:55:05 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2022-04-06 14:19:49 +0100 |
commit | 6a0a783c268b00df165b115d915b628e36a0f69b (patch) | |
tree | 872032a8bf3e943a444d84e4751a7197d646862c /tty-keys.c | |
parent | 7f40c5b647241e0ac3c71c3c95a8cc33790e707e (diff) | |
download | rtmux-6a0a783c268b00df165b115d915b628e36a0f69b.tar.gz rtmux-6a0a783c268b00df165b115d915b628e36a0f69b.tar.bz2 rtmux-6a0a783c268b00df165b115d915b628e36a0f69b.zip |
Support more mouse buttons when the terminal sends them, GitHub issue
3055.
Diffstat (limited to 'tty-keys.c')
-rw-r--r-- | tty-keys.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |