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)
diff --git a/src/dict.c b/src/dict.c
index b6c9016..a5569e6 100644
--- a/src/dict.c
+++ b/src/dict.c
@@ -922,7 +922,12 @@
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;
}
}