Commit: patch 9.2.0994: Vim9: No error for :open during compilation

Christian Brabandt <[email protected]>
Newsgroups gmane.editors.vim.devel
Message-ID <[email protected]>
patch 9.2.0994: Vim9: No error for :open during compilation

Commit: https://github.com/vim/vim/commit/18c7f93bbe9ac41922412a3a5eb2296539000a90
Author: Doug Kearns <[email protected]>
Date:   Fri Aug 21 15:37:24 2026 +0000

    patch 9.2.0994: Vim9: No error for :open during compilation
    
    Problem:  No error for :open during Vim9 compilation.
    Solution: Abort compilation with E1100, like other commands disallowed
              in Vim9 (Doug Kearns).
    
    closes: #21120
    
    Signed-off-by: Doug Kearns <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/src/testdir/test_vim9_script.vim b/src/testdir/test_vim9_script.vim
index c82c01a0f..ad25a0a62 100644
--- a/src/testdir/test_vim9_script.vim
+++ b/src/testdir/test_vim9_script.vim
@@ -2034,6 +2034,8 @@ def Test_no_insert_xit()
   v9.CheckDefExecFailure(['a = 1'], 'E1100:')
   v9.CheckDefExecFailure(['c = 1'], 'E1100:')
   v9.CheckDefExecFailure(['i = 1'], 'E1100:')
+  v9.CheckDefExecFailure(['k = 1'], 'E1100:')
+  v9.CheckDefExecFailure(['o = 1'], 'E1100:')
   v9.CheckDefExecFailure(['t = 1'], 'E1100:')
   v9.CheckDefExecFailure(['x = 1'], 'E1100:')
 
@@ -2043,11 +2045,14 @@ def Test_no_insert_xit()
   v9.CheckScriptFailure(['vim9script', 'c'], 'E1100:')
   v9.CheckScriptFailure(['vim9script', 'i = 1'], 'E488:')
   v9.CheckScriptFailure(['vim9script', 'i'], 'E1100:')
+  v9.CheckScriptFailure(['vim9script', 'k = 1'], 'E1100:')
+  v9.CheckScriptFailure(['vim9script', 'k'], 'E1100:')
   v9.CheckScriptFailure(['vim9script', 'o = 1'], 'E1100:')
   v9.CheckScriptFailure(['vim9script', 'o'], 'E1100:')
-  v9.CheckScriptFailure(['vim9script', 't'], 'E1100:')
   v9.CheckScriptFailure(['vim9script', 't = 1'], 'E1100:')
+  v9.CheckScriptFailure(['vim9script', 't'], 'E1100:')
   v9.CheckScriptFailure(['vim9script', 'x = 1'], 'E1100:')
+  v9.CheckScriptFailure(['vim9script', 'x'], 'E1100:')
 enddef
 
 def s:IfElse(what: number): string
@@ -4845,6 +4850,11 @@ def Test_unsupported_commands()
   END
   v9.CheckDefAndScriptFailure(lines, 'E481:')
 
+  lines =<< trim END
+    o
+  END
+  v9.CheckDefAndScriptFailure(lines, 'E1100:')
+
   lines =<< trim END
     t
   END
diff --git a/src/version.c b/src/version.c
index 410454557..07c999989 100644
--- a/src/version.c
+++ b/src/version.c
@@ -763,6 +763,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    994,
 /**/
     993,
 /**/
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 5f51fdf6d..ab212ffb4 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -4777,6 +4777,7 @@ compile_def_function_body(
 	    case CMD_change:
 	    case CMD_insert:
 	    case CMD_k:
+	    case CMD_open:
 	    case CMD_t:
 	    case CMD_xit:
 		    not_in_vim9(&ea);

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/vim_dev/E1wxo8a-00H4r4-VO%40256bit.org.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.