aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/edit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index 4b472a2fbd..3006f423dc 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -3170,7 +3170,7 @@ bool in_cinkeys(int keytyped, int when, bool line_is_empty)
} else {
// TODO(@brammool): multi-byte
if (keytyped == (int)(uint8_t)p[-1]
- || (icase && keytyped < 256
+ || (icase && keytyped < 256 && keytyped >= 0
&& TOLOWER_LOC(keytyped) == TOLOWER_LOC((uint8_t)p[-1]))) {
char *line = get_cursor_pos_ptr();
assert(p >= look && (uintmax_t)(p - look) <= SIZE_MAX);