aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/keycodes.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-03-05 09:18:42 +0800
committerGitHub <noreply@github.com>2023-03-05 09:18:42 +0800
commit419819b6245e120aba8897e3ddea711b2cd0246c (patch)
tree6a86105155ec9abc9553d3ed69a30321f4be9a01 /src/nvim/keycodes.c
parentb44b8e7687ece66f4c535182071223d78ca54ad0 (diff)
downloadrneovim-419819b6245e120aba8897e3ddea711b2cd0246c.tar.gz
rneovim-419819b6245e120aba8897e3ddea711b2cd0246c.tar.bz2
rneovim-419819b6245e120aba8897e3ddea711b2cd0246c.zip
vim-patch:9.0.1380: CTRL-X on 2**64 subtracts two (#22530)
Problem: CTRL-X on 2**64 subtracts two. (James McCoy) Solution: Correct computation for large number. (closes vim/vim#12103) https://github.com/vim/vim/commit/5fb78c3fa5c996c08a65431d698bd2c251eef5c7 Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/keycodes.c')
-rw-r--r--src/nvim/keycodes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/keycodes.c b/src/nvim/keycodes.c
index a3edd1465a..f3d379c2e9 100644
--- a/src/nvim/keycodes.c
+++ b/src/nvim/keycodes.c
@@ -673,7 +673,7 @@ int find_special_key(const char **const srcp, const size_t src_len, int *const m
if (end - bp > 3 && bp[0] == 't' && bp[1] == '_') {
bp += 3; // skip t_xx, xx may be '-' or '>'
} else if (end - bp > 4 && STRNICMP(bp, "char-", 5) == 0) {
- vim_str2nr(bp + 5, NULL, &l, STR2NR_ALL, NULL, NULL, 0, true);
+ vim_str2nr(bp + 5, NULL, &l, STR2NR_ALL, NULL, NULL, 0, true, NULL);
if (l == 0) {
emsg(_(e_invarg));
return 0;
@@ -704,7 +704,7 @@ int find_special_key(const char **const srcp, const size_t src_len, int *const m
if (STRNICMP(last_dash + 1, "char-", 5) == 0
&& ascii_isdigit(last_dash[6])) {
// <Char-123> or <Char-033> or <Char-0x33>
- vim_str2nr(last_dash + 6, NULL, &l, STR2NR_ALL, NULL, &n, 0, true);
+ vim_str2nr(last_dash + 6, NULL, &l, STR2NR_ALL, NULL, &n, 0, true, NULL);
if (l == 0) {
emsg(_(e_invarg));
return 0;