To: vim_dev@googlegroups.com Subject: Patch 8.2.4438 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4438 Problem: Crash on exit when using cmdline window. Solution: Reset "cmdwin_type" before exiting. (closes #9817) Files: src/ui.c, src/testdir/test_exit.vim *** ../vim-8.2.4437/src/ui.c 2022-01-28 15:28:00.212927659 +0000 --- src/ui.c 2022-02-22 12:03:47.497804732 +0000 *************** *** 1065,1070 **** --- 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(); } *** ../vim-8.2.4437/src/testdir/test_exit.vim 2020-11-30 16:40:41.303714382 +0000 --- src/testdir/test_exit.vim 2022-02-22 11:58:51.550550484 +0000 *************** *** 1,6 **** --- 1,7 ---- " Tests for exiting Vim. source shared.vim + source check.vim func Test_exiting() let after =<< trim [CODE] *************** *** 109,112 **** --- 110,126 ---- call delete('Xtestout') endfunc + func Test_exit_error_reading_input() + CheckNotGui + + call writefile([":au VimLeave * call writefile(['l = ' .. v:exiting], 'Xtestout')", ":tabnew\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 *** ../vim-8.2.4437/src/version.c 2022-02-22 11:04:46.526452275 +0000 --- src/version.c 2022-02-22 12:04:12.145742428 +0000 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 4438, /**/ -- The sooner you fall behind, the more time you'll have to catch up. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///