diff options
Diffstat (limited to 'src/vim9script.c')
-rw-r--r-- | src/vim9script.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/vim9script.c b/src/vim9script.c index 7d783ea93..2e94b8e29 100644 --- a/src/vim9script.c +++ b/src/vim9script.c @@ -64,16 +64,17 @@ ex_vim9script(exarg_T *eap) int not_in_vim9(exarg_T *eap) { - switch (eap->cmdidx) - { - case CMD_insert: - case CMD_append: - case CMD_change: - case CMD_xit: - semsg(_("E1100: Missing :let: %s"), eap->cmd); - return FAIL; - default: break; - } + if (in_vim9script()) + switch (eap->cmdidx) + { + case CMD_insert: + case CMD_append: + case CMD_change: + case CMD_xit: + semsg(_("E1100: Missing :let: %s"), eap->cmd); + return FAIL; + default: break; + } return OK; } |