mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.1159: Vim9: no error for missing space after a comma
Problem: Vim9: no error for missing space after a comma. Solution: Check for white space.
This commit is contained in:
parent
b335b29e1c
commit
6b7a0a8c20
@ -1014,6 +1014,7 @@ def Test_expr7_list()
|
|||||||
|
|
||||||
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 CheckDefExecFailure(["let x = g:list_mixed['xx']"], 'E39:')
|
call CheckDefExecFailure(["let x = g:list_mixed['xx']"], 'E39:')
|
||||||
call CheckDefFailure(["let x = g:list_mixed[0"], 'E111:')
|
call CheckDefFailure(["let x = g:list_mixed[0"], 'E111:')
|
||||||
call CheckDefExecFailure(["let x = g:list_empty[3]"], 'E684:')
|
call CheckDefExecFailure(["let x = g:list_empty[3]"], 'E684:')
|
||||||
|
@ -571,7 +571,7 @@ enddef
|
|||||||
|
|
||||||
def Test_try_catch_fails()
|
def Test_try_catch_fails()
|
||||||
call CheckDefFailure(['catch'], 'E603:')
|
call CheckDefFailure(['catch'], 'E603:')
|
||||||
call CheckDefFailure(['try', 'echo 0', 'catch','catch'], 'E1033:')
|
call CheckDefFailure(['try', 'echo 0', 'catch', 'catch'], 'E1033:')
|
||||||
call CheckDefFailure(['try', 'echo 0', 'catch /pat'], 'E1067:')
|
call CheckDefFailure(['try', 'echo 0', 'catch /pat'], 'E1067:')
|
||||||
call CheckDefFailure(['finally'], 'E606:')
|
call CheckDefFailure(['finally'], 'E606:')
|
||||||
call CheckDefFailure(['try', 'echo 0', 'finally', 'echo 1', 'finally'], 'E607:')
|
call CheckDefFailure(['try', 'echo 0', 'finally', 'echo 1', 'finally'], 'E607:')
|
||||||
|
@ -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 */
|
||||||
|
/**/
|
||||||
|
1159,
|
||||||
/**/
|
/**/
|
||||||
1158,
|
1158,
|
||||||
/**/
|
/**/
|
||||||
|
@ -3060,7 +3060,14 @@ compile_list(char_u **arg, cctx_T *cctx)
|
|||||||
break;
|
break;
|
||||||
++count;
|
++count;
|
||||||
if (*p == ',')
|
if (*p == ',')
|
||||||
|
{
|
||||||
++p;
|
++p;
|
||||||
|
if (*p != ']' && !IS_WHITE_OR_NUL(*p))
|
||||||
|
{
|
||||||
|
semsg(_(e_white_after), ",");
|
||||||
|
return FAIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
whitep = p;
|
whitep = p;
|
||||||
p = skipwhite(p);
|
p = skipwhite(p);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user