Skip to content

Commit

Permalink
patch 8.2.3279: Vim9: cannot use block in cmdline window
Browse files Browse the repository at this point in the history
Problem:    Vim9: cannot use block in cmdline window.
Solution:   Add EX_CMDWIN to the CMD_block flags. (closes #8689)
  • Loading branch information
brammool committed Aug 2, 2021
1 parent 7bf9a07 commit 2c70711
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ex_cmds.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
15 changes: 14 additions & 1 deletion src/testdir/test_vim9_cmd.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
3279,
/**/
3278,
/**/
Expand Down

0 comments on commit 2c70711

Please sign in to comment.