patch 9.1.0752: can set 'cedit' to an invalid value
Problem: can set cedit to an invalid value
Solution: Check that the value is a valid key name
(Milly)
closes: #15778
Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/ex_getln.c b/src/ex_getln.c
index ef7ca91..9d0695a 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -4445,7 +4445,7 @@
else
{
n = string_to_key(p_cedit, FALSE);
- if (vim_isprintc(n))
+ if (n == 0 || vim_isprintc(n))
return e_invalid_argument;
cedit_key = n;
}