From c64acad4e2d4c8c05404f05dd149da9d34960a3d Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 5 Oct 2022 21:14:03 +0800 Subject: vim-patch:8.2.2413: crash when using :all while using a cmdline window Problem: Crash when using :all while using a cmdline window. (Zdenek Dohnal) Solution: Disallow :all from the cmdline window. https://github.com/vim/vim/commit/bb4b93ed85726c3921596ca267f531c8c94d819a Use test from lastest Vim instead. --- src/nvim/testdir/test_arglist.vim | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_arglist.vim b/src/nvim/testdir/test_arglist.vim index 521c3fcd57..19b64f996c 100644 --- a/src/nvim/testdir/test_arglist.vim +++ b/src/nvim/testdir/test_arglist.vim @@ -591,4 +591,20 @@ func Test_quit_with_arglist() call delete('.c.swp') endfunc +" Test for ":all" not working when in the cmdline window +func Test_all_not_allowed_from_cmdwin() + au BufEnter * all + next x + " Use try/catch here, somehow assert_fails() doesn't work on MS-Windows + " console. + let caught = 'no' + try + exe ":norm! 7q?apat\" + catch /E11:/ + let caught = 'yes' + endtry + call assert_equal('yes', caught) + au! BufEnter +endfunc + " vim: shiftwidth=2 sts=2 expandtab -- cgit