forked from aniani/vim
patch 9.1.0758: it's possible to set an invalid key to 'wildcharm'
Problem: it's possible to set an invalid key to 'wildcharm' Solution: error out, if the 'wildcharm' value is an invalid key (Milly) closes: #15787 Signed-off-by: Milly <milly.ca@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
60310a4b26
commit
40c6babc17
11
src/option.c
11
src/option.c
@@ -2251,10 +2251,11 @@ do_set_option_numeric(
|
||||
* Different ways to set a number option:
|
||||
* & set to default value
|
||||
* < set to global value
|
||||
* <xx> accept special key codes for 'wildchar'
|
||||
* c accept any non-digit for 'wildchar'
|
||||
* [-]0-9 set number
|
||||
* other error
|
||||
* <xx> accept special key codes for 'wildchar' or 'wildcharm'
|
||||
* ^x accept ctrl key codes for 'wildchar' or 'wildcharm'
|
||||
* c accept any non-digit for 'wildchar' or 'wildcharm'
|
||||
* [-]0-9 set number
|
||||
* other error
|
||||
*/
|
||||
++arg;
|
||||
if (nextchar == '&')
|
||||
@@ -2281,7 +2282,7 @@ do_set_option_numeric(
|
||||
&& !VIM_ISDIGIT(*arg))))
|
||||
{
|
||||
value = string_to_key(arg, FALSE);
|
||||
if (value == 0 && (long *)varp != &p_wcm)
|
||||
if (value == 0)
|
||||
{
|
||||
errmsg = e_invalid_argument;
|
||||
goto skip;
|
||||
|
Reference in New Issue
Block a user