diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-04-27 20:28:58 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-04-29 15:51:04 +0800 |
commit | bf065d9bb654263e59949a68d0b90fd196ab1ab8 (patch) | |
tree | a9f7db21bf6145ca6ac0d6a567a8ec263a5d58f2 /src/nvim/getchar.c | |
parent | f2b512ad75cace9126eb0ea644daedd758c238e6 (diff) | |
download | rneovim-bf065d9bb654263e59949a68d0b90fd196ab1ab8.tar.gz rneovim-bf065d9bb654263e59949a68d0b90fd196ab1ab8.tar.bz2 rneovim-bf065d9bb654263e59949a68d0b90fd196ab1ab8.zip |
vim-patch:8.2.4829: a key may be simplified to NUL
Problem: A key may be simplified to NUL.
Solution: Use K_ZERO instead. Use macros instead of hard coded values.
(closes vim/vim#10290)
https://github.com/vim/vim/commit/17c95d9608370559441bb73941ba6d9a4b6b26bd
Diffstat (limited to 'src/nvim/getchar.c')
-rw-r--r-- | src/nvim/getchar.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index 2fe732d6f4..9826317102 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -1450,7 +1450,7 @@ int merge_modifiers(int c_arg, int *modifiers) if (*modifiers & MOD_MASK_CTRL) { if ((c >= '`' && c <= 0x7f) || (c >= '@' && c <= '_')) { c &= 0x1f; - if (c == 0) { + if (c == NUL) { c = K_ZERO; } } else if (c == '6') { @@ -2738,7 +2738,7 @@ int inchar(char_u *buf, int maxlen, long wait_time) for (;;) { len = os_inchar(dum, DUM_LEN, 0L, 0, NULL); - if (len == 0 || (len == 1 && dum[0] == 3)) { + if (len == 0 || (len == 1 && dum[0] == Ctrl_C)) { break; } } |