1
0
forked from aniani/vim

patch 8.2.1311: test failures with legacy Vim script

Problem:    Test failures with legacy Vim script.
Solution:   Actually check for Vim9 script.
This commit is contained in:
Bram Moolenaar
2020-07-28 21:15:07 +02:00
parent bd7f7c123d
commit 68e30449a2
2 changed files with 13 additions and 10 deletions

View File

@@ -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 */
/**/
1311,
/**/ /**/
1310, 1310,
/**/ /**/

View File

@@ -64,16 +64,17 @@ ex_vim9script(exarg_T *eap)
int int
not_in_vim9(exarg_T *eap) not_in_vim9(exarg_T *eap)
{ {
switch (eap->cmdidx) if (in_vim9script())
{ switch (eap->cmdidx)
case CMD_insert: {
case CMD_append: case CMD_insert:
case CMD_change: case CMD_append:
case CMD_xit: case CMD_change:
semsg(_("E1100: Missing :let: %s"), eap->cmd); case CMD_xit:
return FAIL; semsg(_("E1100: Missing :let: %s"), eap->cmd);
default: break; return FAIL;
} default: break;
}
return OK; return OK;
} }