summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ex_docmd.c4
-rw-r--r--src/testdir/test_vim9_script.vim2
-rw-r--r--src/version.c2
-rw-r--r--src/vim9script.c1
4 files changed, 9 insertions, 0 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 40e70c32b..c7b57ba99 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -6609,6 +6609,10 @@ ex_open(exarg_T *eap)
regmatch_T regmatch;
char_u *p;
+#ifdef FEAT_EVAL
+ if (not_in_vim9(eap) == FAIL)
+ return;
+#endif
curwin->w_cursor.lnum = eap->line2;
beginline(BL_SOL | BL_FIX);
if (*eap->arg == '/')
diff --git a/src/testdir/test_vim9_script.vim b/src/testdir/test_vim9_script.vim
index d2f5febb9..78ff44b93 100644
--- a/src/testdir/test_vim9_script.vim
+++ b/src/testdir/test_vim9_script.vim
@@ -1880,6 +1880,8 @@ def Test_no_insert_xit()
CheckScriptFailure(['vim9script', 'c'], 'E1100:')
CheckScriptFailure(['vim9script', 'i = 1'], 'E488:')
CheckScriptFailure(['vim9script', 'i'], 'E1100:')
+ CheckScriptFailure(['vim9script', 'o = 1'], 'E1100:')
+ CheckScriptFailure(['vim9script', 'o'], 'E1100:')
CheckScriptFailure(['vim9script', 't'], 'E1100:')
CheckScriptFailure(['vim9script', 't = 1'], 'E1100:')
CheckScriptFailure(['vim9script', 'x = 1'], 'E1100:')
diff --git a/src/version.c b/src/version.c
index f35f8b0b0..78eb6341d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2598,
+/**/
2597,
/**/
2596,
diff --git a/src/vim9script.c b/src/vim9script.c
index faee1316c..05977b641 100644
--- a/src/vim9script.c
+++ b/src/vim9script.c
@@ -102,6 +102,7 @@ not_in_vim9(exarg_T *eap)
case CMD_append:
case CMD_change:
case CMD_insert:
+ case CMD_open:
case CMD_t:
case CMD_xit:
semsg(_(e_command_not_supported_in_vim9_script_missing_var_str), eap->cmd);