Problem: Resetting cmdwin_type only for one situation.
Solution: Reset cmdwin_type before closing windows. (closes #9822)
call writefile([":au VimLeave * call writefile(['l = ' .. v:exiting], 'Xtestout')", ":tabnew", "q:"], 'Xscript', 'b')
if RunVim([], [], '<Xscript')
+ call assert_equal(1, v:shell_error)
call assert_equal(['l = 1'], readfile('Xtestout'))
endif
call delete('Xscript')
if (silent_mode) // Normal way to exit for "ex -s"
getout(0);
STRCPY(IObuff, _("Vim: Error reading input, exiting...\n"));
-#ifdef FEAT_CMDWIN
- cmdwin_type = 0;
-#endif
preserve_exit();
}
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 4454,
/**/
4453,
/**/
{
int dummy;
+#ifdef FEAT_CMDWIN
+ // avoid an error for switching tabpage with the cmdline window open
+ cmdwin_type = 0;
+#endif
while (first_tabpage->tp_next != NULL)
tabpage_close(TRUE);