# HG changeset patch # User Bram Moolenaar # Date 1611776704 -3600 # Node ID d98dcbc57f7f6878028e53471b0e722a637e492c # Parent 7ac205554b4fa3e867ec04f9308185f31c4df9fc patch 8.2.2416: may get stuck in command line window state Commit: https://github.com/vim/vim/commit/bed72df3e61a8908ed6324212595118f305dded0 Author: Bram Moolenaar Date: Wed Jan 27 20:34:29 2021 +0100 patch 8.2.2416: may get stuck in command line window state Problem: May get stuck in command line window state. Solution: Reset "cmdwin_type" when editing buffer fails. Make arglist test pass on MS-Windows. diff --git a/src/ex_getln.c b/src/ex_getln.c --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -4214,6 +4214,7 @@ open_cmdwin(void) // Some autocommand messed it up? win_close(curwin, TRUE); ga_clear(&winsizes); + cmdwin_type = 0; return Ctrl_C; } diff --git a/src/testdir/test_arglist.vim b/src/testdir/test_arglist.vim --- 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\", 'E11:') + " 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 diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2416, +/**/ 2415, /**/ 2414,