diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-01-27 20:34:29 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-01-27 20:34:29 +0100 |
commit | bed72df3e61a8908ed6324212595118f305dded0 (patch) | |
tree | 6c18a3f46cb6794d166f81d35cb8bbbe7b4ca8cc /src/testdir/test_arglist.vim | |
parent | 21829c5f2c86cd525c8468121b4fc54c5d75bf6e (diff) | |
download | vim-git-bed72df3e61a8908ed6324212595118f305dded0.tar.gz |
patch 8.2.2416: may get stuck in command line window statev8.2.2416
Problem: May get stuck in command line window state.
Solution: Reset "cmdwin_type" when editing buffer fails. Make arglist test
pass on MS-Windows.
Diffstat (limited to 'src/testdir/test_arglist.vim')
-rw-r--r-- | src/testdir/test_arglist.vim | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/testdir/test_arglist.vim b/src/testdir/test_arglist.vim index 620299349..4f169416a 100644 --- a/src/testdir/test_arglist.vim +++ b/src/testdir/test_arglist.vim @@ -563,12 +563,18 @@ endfunc " Test for ":all" not working when in the cmdline window func Test_all_not_allowed_from_cmdwin() CheckFeature cmdwin - " TODO: why does this hang on Windows? - CheckNotMSWindows au BufEnter * all next x - call assert_fails(":norm 7q?print\<CR>", 'E11:') + " Use try/catch here, somehow assert_fails() doesn't work on MS-Windows + " console. + let caught = 'no' + try + exe ":norm! 7q?apat\<CR>" + catch /E11:/ + let caught = 'yes' + endtry + call assert_equal('yes', caught) au! BufEnter endfunc |