diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-07-31 22:38:17 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-07-31 22:38:17 +0200 |
commit | badd8486f7442bfcf55e0234ece80488958e7114 (patch) | |
tree | a1f41f30f0e7579585be9dcd4f6e84f7157429c1 /src | |
parent | 3a53ec8bdddccf06a0e9db263277c50a6015294d (diff) | |
download | vim-git-badd8486f7442bfcf55e0234ece80488958e7114.tar.gz |
patch 8.2.1331: Vim9: :echo with two lists doesn't workv8.2.1331
Problem: Vim9: :echo with two lists doesn't work.
Solution: Do not skip white space before []. (closes #6552)
Diffstat (limited to 'src')
-rw-r--r-- | src/testdir/test_vim9_expr.vim | 8 | ||||
-rw-r--r-- | src/version.c | 2 | ||||
-rw-r--r-- | src/vim9compile.c | 2 |
3 files changed, 11 insertions, 1 deletions
diff --git a/src/testdir/test_vim9_expr.vim b/src/testdir/test_vim9_expr.vim index 550e41982..226db83f8 100644 --- a/src/testdir/test_vim9_expr.vim +++ b/src/testdir/test_vim9_expr.vim @@ -1176,6 +1176,10 @@ def Test_expr7_list() 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,6 +1197,10 @@ def Test_expr7_list_vim9script() 22, ] assert_equal([11, 22], l) + + echo [1, + 2] [3, + 4] END CheckScriptSuccess(lines) diff --git a/src/version.c b/src/version.c index b52bd2f50..225674268 100644 --- a/src/version.c +++ b/src/version.c @@ -755,6 +755,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1331, +/**/ 1330, /**/ 1329, diff --git a/src/vim9compile.c b/src/vim9compile.c index b9b2b6fa5..87a9fd1ce 100644 --- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -3855,7 +3855,7 @@ compile_subscript( return FAIL; } } - else if (*p == '[') + else if (**arg == '[') { garray_T *stack = &cctx->ctx_type_stack; type_T **typep; |