To: vim_dev@googlegroups.com Subject: Patch 8.2.2414 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.2414 Problem: Using freed memory when closing the cmdline window. Solution: Check the window is still valid. Files: src/ex_getln.c *** ../vim-8.2.2413/src/ex_getln.c 2021-01-26 21:35:05.048158026 +0100 --- src/ex_getln.c 2021-01-26 21:59:15.218347244 +0100 *************** *** 4395,4404 **** // Avoid command-line window first character being concealed. curwin->w_p_cole = 0; # endif wp = curwin; set_bufref(&bufref, curbuf); win_goto(old_curwin); ! win_close(wp, TRUE); // win_close() may have already wiped the buffer when 'bh' is // set to 'wipe' --- 4395,4409 ---- // Avoid command-line window first character being concealed. curwin->w_p_cole = 0; # endif + // First go back to the original window. wp = curwin; set_bufref(&bufref, curbuf); win_goto(old_curwin); ! ! // win_goto() may trigger an autocommand that already closes the ! // cmdline window. ! if (win_valid(wp)) ! win_close(wp, TRUE); // win_close() may have already wiped the buffer when 'bh' is // set to 'wipe' *** ../vim-8.2.2413/src/version.c 2021-01-26 21:35:05.052158016 +0100 --- src/version.c 2021-01-26 22:00:31.618184606 +0100 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2414, /**/ -- If you're sending someone Styrofoam, what do you pack it in? /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///