Patch 8.2.3862
Problem:    Crash on exit with EXITFREE and using win_execute().
Solution:   Also save and restore tp_topframe. (issue #9374)
Files:      src/evalwindow.c, src/testdir/test_execute_func.vim


*** ../vim-8.2.3861/src/evalwindow.c    2021-11-20 11:13:53.201671127 +0000
--- src/evalwindow.c    2021-12-20 21:33:04.914491083 +0000
***************
*** 1250,1258 ****
--- 1250,1260 ----
        {
            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,1302 ****
--- 1296,1306 ----
        {
            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);
*** ../vim-8.2.3861/src/testdir/test_execute_func.vim   2021-12-19 
18:33:17.317954818 +0000
--- src/testdir/test_execute_func.vim   2021-12-20 21:32:54.222518591 +0000
***************
*** 3,8 ****
--- 3,9 ----
  source view_util.vim
  source check.vim
  source vim9.vim
+ source term_util.vim
  
  func NestedEval()
    let nested = execute('echo "nested\nlines"')
***************
*** 148,153 ****
--- 149,175 ----
    unlet xyz
  endfunc
  
+ func Test_win_execute_on_startup()
+   CheckRunVimInTerminal
+ 
+   let lines =<< trim END
+       vim9script
+       [repeat('x', &columns)]->writefile('Xfile1')
+       silent tabedit Xfile2
+       var id = win_getid()
+       silent tabedit Xfile3
+       autocmd VimEnter * win_execute(id, 'close')
+   END
+   call writefile(lines, 'XwinExecute')
+   let buf = RunVimInTerminal('-p Xfile1 -Nu XwinExecute', {})
+ 
+   " this was crashing on exit with EXITFREE defined
+   call StopVimInTerminal(buf)
+ 
+   call delete('XwinExecute')
+   call delete('Xfile1')
+ endfunc
+ 
  func Test_execute_func_with_null()
    call assert_equal("", execute(test_null_string()))
    call assert_equal("", execute(test_null_list()))
*** ../vim-8.2.3861/src/version.c       2021-12-20 15:53:09.805669660 +0000
--- src/version.c       2021-12-20 21:18:05.212978848 +0000
***************
*** 751,752 ****
--- 751,754 ----
  {   /* Add new patch number below this line */
+ /**/
+     3862,
  /**/

-- 
>From "know your smileys":
 :^[/   mean-smiley-with-cigarette

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20211220213633.A2C801C014A%40moolenaar.net.

Raspunde prin e-mail lui