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)
diff --git a/src/dict.c b/src/dict.c
index 019227f..af1e1e9 100644
--- a/src/dict.c
+++ b/src/dict.c
@@ -838,7 +838,7 @@
 		: 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 @@
 	}
 	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)
 	{
diff --git a/src/list.c b/src/list.c
index 5c2f60e..14a31bc 100644
--- a/src/list.c
+++ b/src/list.c
@@ -1194,6 +1194,9 @@
 	    else
 		clear_tv(&tv);
 	}
+	// Legacy Vim script allowed a space before the comma.
+	if (!vim9script)
+	    *arg = skipwhite(*arg);
 
 	// the comma must come after the value
 	had_comma = **arg == ',';
diff --git a/src/testdir/test_listdict.vim b/src/testdir/test_listdict.vim
index beeda2f..563c79f 100644
--- a/src/testdir/test_listdict.vim
+++ b/src/testdir/test_listdict.vim
@@ -23,6 +23,9 @@
   call assert_equal(10, x)
 endfunc
 
+" This was allowed in legacy Vim script
+let s:list_with_spaces = [1 , 2 , 3]
+
 " List slices
 func Test_list_slice()
   let l = [1, 'as''d', [1, 2, function("strlen")], {'a': 1},]
@@ -202,6 +205,10 @@
   call assert_fails("let d={'k' : i}", 'E121:')
 endfunc
 
+" This was allowed in legacy Vim script
+let s:dict_with_spaces = {'one' : 1 , 'two' : 2 , 'three' : 3}
+let s:dict_with_spaces_lit = #{one : 1 , two : 2 , three : 3}
+
 " Dictionary identity
 func Test_dict_identity()
   let d = {001: 'asd', 'b': [1, 2, function('strlen')], -1: {'a': 1},}
diff --git a/src/version.c b/src/version.c
index 806e064..6a939f4 100644
--- a/src/version.c
+++ b/src/version.c
@@ -755,6 +755,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1328,
+/**/
     1327,
 /**/
     1326,