changeset 25485:7d24fdd18672 v8.2.3279

patch 8.2.3279: Vim9: cannot use block in cmdline window Commit: https://github.com/vim/vim/commit/2c70711e3fb2ef24a7f55322fdadbf7f9e657c2f Author: Bram Moolenaar <Bram@vim.org> Date: Mon Aug 2 22:26:56 2021 +0200 patch 8.2.3279: Vim9: cannot use block in cmdline window Problem: Vim9: cannot use block in cmdline window. Solution: Add EX_CMDWIN to the CMD_block flags. (closes https://github.com/vim/vim/issues/8689)
author Bram Moolenaar <Bram@vim.org>
date Mon, 02 Aug 2021 22:30:04 +0200
parents 5242c4ad09dd
children 9ca6ec7da094
files src/ex_cmds.h src/testdir/test_vim9_cmd.vim src/version.c
diffstat 3 files changed, 17 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/ex_cmds.h
+++ b/src/ex_cmds.h
@@ -1853,7 +1853,7 @@ EXCMD(CMD_at,		"@",		ex_at,
 	EX_RANGE|EX_WHOLEFOLD|EX_EXTRA|EX_TRLBAR|EX_CMDWIN|EX_LOCK_OK|EX_NONWHITE_OK,
 	ADDR_LINES),
 EXCMD(CMD_block,	"{",		ex_block,  // not found normally
-	EX_TRLBAR|EX_LOCK_OK,
+	EX_TRLBAR|EX_LOCK_OK|EX_CMDWIN,
 	ADDR_NONE),
 EXCMD(CMD_endblock,	"}",		ex_endblock,
 	EX_TRLBAR|EX_CMDWIN|EX_LOCK_OK,
--- a/src/testdir/test_vim9_cmd.vim
+++ b/src/testdir/test_vim9_cmd.vim
@@ -1262,7 +1262,7 @@ def Test_substitute_expr()
   # List results in multiple lines
   new
   setline(1, 'some text here')
-  s/text/\=['aaa', 'bbb', 'ccc']/ 
+  s/text/\=['aaa', 'bbb', 'ccc']/
   assert_equal(['some aaa', 'bbb', 'ccc', ' here'], getline(1, '$'))
   bwipe!
 enddef
@@ -1338,5 +1338,18 @@ def Test_echo_void()
   CheckScriptFailure(lines, 'E1186:', 1)
 enddef
 
+def Test_cmdwin_block()
+  augroup justTesting
+    autocmd BufEnter * {
+      echomsg 'in block'
+    }
+  augroup END
+  feedkeys('q:', 'xt')
+  redraw
+  feedkeys("aclose\<CR>", 'xt')
+
+  au! justTesting
+enddef
+
 
 " vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker
--- a/src/version.c
+++ b/src/version.c
@@ -756,6 +756,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    3279,
+/**/
     3278,
 /**/
     3277,