neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 2a267d1cbfc3fcd64e02f4a93536a868da4ef2a4
parent 758e6db06c0b59bdbd05d14075138e5fe832d3dc
Author: Jan Edmund Lazo <jan.lazo@mail.utoronto.ca>
Date:   Mon,  4 Aug 2025 14:47:22 -0400

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)

https://github.com/vim/vim/commit/4d4d1cd5c8b61ef0296bd6190ca2a0b2d6d96ba7

Partial port to guard against v8.2.1326 regression.

Co-authored-by: Bram Moolenaar <Bram@vim.org>

Diffstat:
Mtest/old/testdir/test_listdict.vim | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/test/old/testdir/test_listdict.vim b/test/old/testdir/test_listdict.vim @@ -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