aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/tui/input.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-07-22 18:00:55 +0800
committerGitHub <noreply@github.com>2023-07-22 18:00:55 +0800
commitd2efcbf2dca6c2899ba0a1be7fc10dbf3f112d26 (patch)
tree5ccd5999192f20426f31a196e4a9b239211c1e94 /src/nvim/tui/input.c
parent4b57ff77febbe6073bc4c5c3a45b0ad0d5d40e6c (diff)
downloadrneovim-d2efcbf2dca6c2899ba0a1be7fc10dbf3f112d26.tar.gz
rneovim-d2efcbf2dca6c2899ba0a1be7fc10dbf3f112d26.tar.bz2
rneovim-d2efcbf2dca6c2899ba0a1be7fc10dbf3f112d26.zip
refactor: remove some (const char **) casts (#24423)
Diffstat (limited to 'src/nvim/tui/input.c')
-rw-r--r--src/nvim/tui/input.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nvim/tui/input.c b/src/nvim/tui/input.c
index a5d021943b..7af28561c2 100644
--- a/src/nvim/tui/input.c
+++ b/src/nvim/tui/input.c
@@ -128,8 +128,6 @@ void tinput_init(TermInput *input, Loop *loop)
input->in_fd = STDIN_FILENO;
input->waiting_for_bg_response = 0;
input->extkeys_type = kExtkeysNone;
- // The main thread is waiting for the UI thread to call CONTINUE, so it can
- // safely access global variables.
input->ttimeout = (bool)p_ttimeout;
input->ttimeoutlen = p_ttm;
input->key_buffer = rbuffer_new(KEY_BUFFER_SIZE);
@@ -372,9 +370,10 @@ static void forward_mouse_event(TermInput *input, TermKeyKey *key)
if (ev == TERMKEY_MOUSE_UNKNOWN && !(key->code.mouse[0] & 0x20)) {
int code = key->code.mouse[0] & ~0x3c;
+ // https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Other-buttons
if (code == 66 || code == 67) {
ev = TERMKEY_MOUSE_PRESS;
- button = code - 60;
+ button = code + 4 - 64;
}
}