0
0
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:
zeertzjq
2022-02-23 12:23:08 +00:00
committed by Bram Moolenaar
parent 4791fcd825
commit 6a8b13614e
4 changed files with 7 additions and 3 deletions

View File

@@ -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')

View File

@@ -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();
}

View File

@@ -750,6 +750,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
4454,
/**/
4453,
/**/

View File

@@ -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);