To: vim_dev@googlegroups.com Subject: Patch 8.2.4454 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4454 Problem: Resetting cmdwin_type only for one situation. Solution: Reset cmdwin_type before closing windows. (closes #9822) Files: src/ui.c, src/window.c, src/testdir/test_exit.vim *** ../vim-8.2.4453/src/ui.c 2022-02-22 12:08:03.985154998 +0000 --- src/ui.c 2022-02-23 12:13:46.830213287 +0000 *************** *** 1065,1073 **** 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(); } --- 1065,1070 ---- *** ../vim-8.2.4453/src/window.c 2022-02-21 17:56:29.621257234 +0000 --- src/window.c 2022-02-23 12:15:05.170106681 +0000 *************** *** 2856,2861 **** --- 2856,2865 ---- { 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); *** ../vim-8.2.4453/src/testdir/test_exit.vim 2022-02-22 18:48:07.489297350 +0000 --- src/testdir/test_exit.vim 2022-02-23 12:13:46.830213287 +0000 *************** *** 119,124 **** --- 119,125 ---- call writefile([":au VimLeave * call writefile(['l = ' .. v:exiting], 'Xtestout')", ":tabnew", "q:"], 'Xscript', 'b') if RunVim([], [], '