mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.1331: Vim9: :echo with two lists doesn't work
Problem: Vim9: :echo with two lists doesn't work. Solution: Do not skip white space before []. (closes #6552)
This commit is contained in:
@@ -1176,6 +1176,10 @@ def Test_expr7_list()
|
|||||||
assert_equal(g:list_mixed, [1, 'b', false,])
|
assert_equal(g:list_mixed, [1, 'b', false,])
|
||||||
assert_equal('b', g:list_mixed[1])
|
assert_equal('b', g:list_mixed[1])
|
||||||
|
|
||||||
|
echo [1,
|
||||||
|
2] [3,
|
||||||
|
4]
|
||||||
|
|
||||||
call CheckDefExecFailure(["let x = g:anint[3]"], 'E714:')
|
call CheckDefExecFailure(["let x = g:anint[3]"], 'E714:')
|
||||||
call CheckDefFailure(["let x = g:list_mixed[xxx]"], 'E1001:')
|
call CheckDefFailure(["let x = g:list_mixed[xxx]"], 'E1001:')
|
||||||
call CheckDefFailure(["let x = [1,2,3]"], 'E1069:')
|
call CheckDefFailure(["let x = [1,2,3]"], 'E1069:')
|
||||||
@@ -1193,6 +1197,10 @@ def Test_expr7_list_vim9script()
|
|||||||
22,
|
22,
|
||||||
]
|
]
|
||||||
assert_equal([11, 22], l)
|
assert_equal([11, 22], l)
|
||||||
|
|
||||||
|
echo [1,
|
||||||
|
2] [3,
|
||||||
|
4]
|
||||||
END
|
END
|
||||||
CheckScriptSuccess(lines)
|
CheckScriptSuccess(lines)
|
||||||
|
|
||||||
|
@@ -754,6 +754,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1331,
|
||||||
/**/
|
/**/
|
||||||
1330,
|
1330,
|
||||||
/**/
|
/**/
|
||||||
|
@@ -3855,7 +3855,7 @@ compile_subscript(
|
|||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (*p == '[')
|
else if (**arg == '[')
|
||||||
{
|
{
|
||||||
garray_T *stack = &cctx->ctx_type_stack;
|
garray_T *stack = &cctx->ctx_type_stack;
|
||||||
type_T **typep;
|
type_T **typep;
|
||||||
|
Reference in New Issue
Block a user