vim-patch:partial: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 vim/vim#6577)

4d4d1cd5c8

Partial port to guard against v8.2.1326 regression.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
Jan Edmund Lazo
2025-08-04 14:47:22 -04:00
parent 758e6db06c
commit 2a267d1cbf

View File

@@ -26,6 +26,9 @@ func Test_list_create()
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},]
@@ -340,6 +343,10 @@ func Test_dict()
call assert_equal(#{g: x}, #{g:x})
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 lines =<< trim END