diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-10-02 07:39:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-01 23:39:28 +0000 |
commit | 2168d772b864fd05109fb4299e409d4bdc1df39d (patch) | |
tree | cb1fe68d2831a0315faa433a7605911b798d62f1 /src/nvim/ex_getln.c | |
parent | d983599613ae19190369c0577a409ede3b1ded38 (diff) | |
download | rneovim-2168d772b864fd05109fb4299e409d4bdc1df39d.tar.gz rneovim-2168d772b864fd05109fb4299e409d4bdc1df39d.tar.bz2 rneovim-2168d772b864fd05109fb4299e409d4bdc1df39d.zip |
vim-patch:9.1.0752: can set 'cedit' to an invalid value (#30616)
Problem: can set cedit to an invalid value
Solution: Check that the value is a valid key name
(Milly)
closes: vim/vim#15778
https://github.com/vim/vim/commit/25732435c56d762abb260499680939bd8882c708
Co-authored-by: Milly <milly.ca@gmail.com>
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r-- | src/nvim/ex_getln.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index 69fcdac095..7d87e609ca 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -4302,7 +4302,7 @@ const char *did_set_cedit(optset_T *args) cedit_key = -1; } else { int n = string_to_key(p_cedit); - if (vim_isprintc(n)) { + if (n == 0 || vim_isprintc(n)) { return e_invarg; } cedit_key = n; |