forked from aniani/vim
patch 8.2.1328: no space allowed before comma in list
Problem: No space allowed before comma in list. Solution: Legacy Vim script allows it. (closes #6577)
This commit is contained in:
@@ -838,7 +838,7 @@ eval_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int literal)
|
||||
: eval1(arg, &tvkey, evalarg)) == FAIL) // recursive!
|
||||
goto failret;
|
||||
|
||||
// The colon should come right after the key, but this wasn't checked
|
||||
// the colon should come right after the key, but this wasn't checked
|
||||
// previously, so only require it in Vim9 script.
|
||||
if (!vim9script)
|
||||
*arg = skipwhite(*arg);
|
||||
@@ -895,7 +895,10 @@ eval_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int literal)
|
||||
}
|
||||
clear_tv(&tvkey);
|
||||
|
||||
// the comma must come after the value
|
||||
// the comma should come right after the value, but this wasn't checked
|
||||
// previously, so only require it in Vim9 script.
|
||||
if (!vim9script)
|
||||
*arg = skipwhite(*arg);
|
||||
had_comma = **arg == ',';
|
||||
if (had_comma)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user