diff options
Diffstat (limited to 'src/nvim/os/input.c')
-rw-r--r-- | src/nvim/os/input.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/nvim/os/input.c b/src/nvim/os/input.c index fa9ff6e9b1..6310b90f04 100644 --- a/src/nvim/os/input.c +++ b/src/nvim/os/input.c @@ -242,8 +242,8 @@ bool os_isatty(int fd) size_t input_enqueue(String keys) { - char *ptr = keys.data; - char *end = ptr + keys.size; + const char *ptr = keys.data; + const char *end = ptr + keys.size; while (rbuffer_space(input_buffer) >= 19 && ptr < end) { // A "<x>" form occupies at least 1 characters, and produces up @@ -254,8 +254,7 @@ size_t input_enqueue(String keys) uint8_t buf[19] = { 0 }; // Do not simplify the keys here. Simplification will be done later. unsigned new_size - = trans_special((const char **)&ptr, (size_t)(end - ptr), (char *)buf, FSK_KEYCODE, true, - NULL); + = trans_special(&ptr, (size_t)(end - ptr), (char *)buf, FSK_KEYCODE, true, NULL); if (new_size) { new_size = handle_mouse_event(&ptr, buf, new_size); @@ -264,7 +263,7 @@ size_t input_enqueue(String keys) } if (*ptr == '<') { - char *old_ptr = ptr; + const char *old_ptr = ptr; // Invalid or incomplete key sequence, skip until the next '>' or *end. do { ptr++; @@ -346,7 +345,7 @@ static uint8_t check_multiclick(int code, int grid, int row, int col) // Mouse event handling code(Extract row/col if available and detect multiple // clicks) -static unsigned handle_mouse_event(char **ptr, uint8_t *buf, unsigned bufsize) +static unsigned handle_mouse_event(const char **ptr, uint8_t *buf, unsigned bufsize) { int mouse_code = 0; int type = 0; |