Problem: Crash on exit when using cmdline window.
Solution: Reset "cmdwin_type" before exiting. (closes #9817)
" Tests for exiting Vim.
source shared.vim
+source check.vim
func Test_exiting()
let after =<< trim [CODE]
call delete('Xtestout')
endfunc
+func Test_exit_error_reading_input()
+ CheckNotGui
+
+ call writefile([":au VimLeave * call writefile(['l = ' .. v:exiting], 'Xtestout')", ":tabnew\<CR>q:"], 'Xscript')
+
+ if RunVim([], [], '< Xscript')
+ call assert_equal(['l = 1'], readfile('Xtestout'))
+ endif
+ call delete('Xscript')
+ call delete('Xtestout')
+endfun
+
+
" vim: shiftwidth=2 sts=2 expandtab
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 */
+/**/
+ 4438,
/**/
4437,
/**/