aboutsummaryrefslogtreecommitdiff
path: root/tmux.h
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2022-04-27 11:34:08 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2022-04-27 11:34:08 +0100
commitc6b51cea923e0c4e92636998a776ada42511b6e5 (patch)
treea4f40113cca66cd1bf0612c86f9949b638691ca3 /tmux.h
parent58d1a206c6ae6b33059ea6b469c21dad92ea0841 (diff)
downloadrtmux-c6b51cea923e0c4e92636998a776ada42511b6e5.tar.gz
rtmux-c6b51cea923e0c4e92636998a776ada42511b6e5.tar.bz2
rtmux-c6b51cea923e0c4e92636998a776ada42511b6e5.zip
If a mouse position was above the maximum supported by the normal mouse
protocol (223), tmux was allowing it to wrap around. However, since tmux was not correctly handling this on input, other programs also do not handle it correctly, and the alternative SGR mouse mode is now widespread, this seems unnecessary, so remove this feature. Also define some constants to make it clearer what the numbers mean. Mostly from Leonid S Usov in GitHub issue 3165.
Diffstat (limited to 'tmux.h')
-rw-r--r--tmux.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/tmux.h b/tmux.h
index a893bdb2..53084b8b 100644
--- a/tmux.h
+++ b/tmux.h
@@ -581,6 +581,12 @@ enum tty_code_code {
#define MOTION_MOUSE_MODES (MODE_MOUSE_BUTTON|MODE_MOUSE_ALL)
#define CURSOR_MODES (MODE_CURSOR|MODE_CURSOR_BLINKING|MODE_CURSOR_VERY_VISIBLE)
+/* Mouse protocol constants. */
+#define MOUSE_PARAM_MAX 0xff
+#define MOUSE_PARAM_UTF8_MAX 0x7ff
+#define MOUSE_PARAM_BTN_OFF 0x20
+#define MOUSE_PARAM_POS_OFF 0x21
+
/* A single UTF-8 character. */
typedef u_int utf8_char;