mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.4454: resetting cmdwin_type only for one situation
Problem: Resetting cmdwin_type only for one situation. Solution: Reset cmdwin_type before closing windows. (closes #9822)
This commit is contained in:
@@ -119,6 +119,7 @@ func Test_exit_error_reading_input()
|
||||
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')
|
||||
|
3
src/ui.c
3
src/ui.c
@@ -1065,9 +1065,6 @@ read_error_exit(void)
|
||||
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();
|
||||
}
|
||||
|
||||
|
@@ -750,6 +750,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
4454,
|
||||
/**/
|
||||
4453,
|
||||
/**/
|
||||
|
@@ -2856,6 +2856,10 @@ win_free_all(void)
|
||||
{
|
||||
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);
|
||||
|
||||
|
Reference in New Issue
Block a user