0
0
mirror of https://github.com/vim/vim.git synced 2025-10-30 09:47:20 -04:00

patch 8.2.1431: Vim9: no error for white space before comma in dict

Problem:    Vim9: no error for white space before comma in dict.
Solution:   Check for extra white space. (closes #6674)
This commit is contained in:
Bram Moolenaar
2020-08-12 18:34:28 +02:00
parent db199216e8
commit c3d6e8a46a
4 changed files with 20 additions and 1 deletions

View File

@@ -922,7 +922,12 @@ eval_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int literal)
if (!had_comma)
{
if (evaluate)
semsg(_(e_missing_dict_comma), *arg);
{
if (**arg == ',')
semsg(_(e_no_white_before), ",");
else
semsg(_(e_missing_dict_comma), *arg);
}
goto failret;
}
}