diff src/evalwindow.c @ 26666:bbcbb3c13fba v8.2.3862

patch 8.2.3862: crash on exit with EXITFREE and using win_execute() Commit: https://github.com/vim/vim/commit/dab17a0689a2f31f69f428975f84b0c3c7ba3030 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Dec 20 21:35:59 2021 +0000 patch 8.2.3862: crash on exit with EXITFREE and using win_execute() Problem: Crash on exit with EXITFREE and using win_execute(). Solution: Also save and restore tp_topframe. (issue https://github.com/vim/vim/issues/9374)
author Bram Moolenaar <Bram@vim.org>
date Mon, 20 Dec 2021 22:45:03 +0100
parents 72c394673e00
children c95a3f25b6b1
line wrap: on
line diff
--- a/src/evalwindow.c
+++ b/src/evalwindow.c
@@ -1250,9 +1250,11 @@ switch_win_noblock(
 	{
 	    curtab->tp_firstwin = firstwin;
 	    curtab->tp_lastwin = lastwin;
+	    curtab->tp_topframe = topframe;
 	    curtab = tp;
 	    firstwin = curtab->tp_firstwin;
 	    lastwin = curtab->tp_lastwin;
+	    topframe = curtab->tp_topframe;
 	}
 	else
 	    goto_tabpage_tp(tp, FALSE, FALSE);
@@ -1294,9 +1296,11 @@ restore_win_noblock(
 	{
 	    curtab->tp_firstwin = firstwin;
 	    curtab->tp_lastwin = lastwin;
+	    curtab->tp_topframe = topframe;
 	    curtab = save_curtab;
 	    firstwin = curtab->tp_firstwin;
 	    lastwin = curtab->tp_lastwin;
+	    topframe = curtab->tp_topframe;
 	}
 	else
 	    goto_tabpage_tp(save_curtab, FALSE, FALSE);