To: vim_dev@googlegroups.com Subject: Patch 8.2.1331 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.1331 Problem: Vim9: :echo with two lists doesn't work. Solution: Do not skip white space before []. (closes #6552) Files: src/vim9compile.c, src/testdir/test_vim9_expr.vim *** ../vim-8.2.1330/src/vim9compile.c 2020-07-31 22:04:59.772336176 +0200 --- src/vim9compile.c 2020-07-31 22:37:48.992001342 +0200 *************** *** 3855,3861 **** return FAIL; } } ! else if (*p == '[') { garray_T *stack = &cctx->ctx_type_stack; type_T **typep; --- 3855,3861 ---- return FAIL; } } ! else if (**arg == '[') { garray_T *stack = &cctx->ctx_type_stack; type_T **typep; *** ../vim-8.2.1330/src/testdir/test_vim9_expr.vim 2020-07-29 21:20:37.926626437 +0200 --- src/testdir/test_vim9_expr.vim 2020-07-31 22:36:58.972213455 +0200 *************** *** 1176,1181 **** --- 1176,1185 ---- assert_equal(g:list_mixed, [1, 'b', false,]) assert_equal('b', g:list_mixed[1]) + echo [1, + 2] [3, + 4] + call CheckDefExecFailure(["let x = g:anint[3]"], 'E714:') call CheckDefFailure(["let x = g:list_mixed[xxx]"], 'E1001:') call CheckDefFailure(["let x = [1,2,3]"], 'E1069:') *************** *** 1193,1198 **** --- 1197,1206 ---- 22, ] assert_equal([11, 22], l) + + echo [1, + 2] [3, + 4] END CheckScriptSuccess(lines) *** ../vim-8.2.1330/src/version.c 2020-07-31 22:17:27.680892838 +0200 --- src/version.c 2020-07-31 22:33:31.017076031 +0200 *************** *** 756,757 **** --- 756,759 ---- { /* Add new patch number below this line */ + /**/ + 1331, /**/ -- From "know your smileys": :-| :-| Deja' vu! /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///