Patch 8.2.0137
Problem:    Crash when using win_execute() from a new tab.
Solution:   Set the tp_*win pointers. (Ozaki Kiichi, closes #5512)
Files:      src/testdir/test_winbuf_close.vim, src/window.c


*** ../vim-8.2.0136/src/testdir/test_winbuf_close.vim   2019-03-30 
19:17:00.000000000 +0100
--- src/testdir/test_winbuf_close.vim   2020-01-20 21:39:53.012483595 +0100
***************
*** 160,166 ****
  endfunction
  
  " Test that 'winfixheight' will be respected even there is non-leaf frame
! fun! Test_winfixheight_non_leaf_frame()
    vsplit
    botright 11new
    let l:wid = win_getid()
--- 160,166 ----
  endfunction
  
  " Test that 'winfixheight' will be respected even there is non-leaf frame
! func Test_winfixheight_non_leaf_frame()
    vsplit
    botright 11new
    let l:wid = win_getid()
***************
*** 173,179 ****
  endf
  
  " Test that 'winfixwidth' will be respected even there is non-leaf frame
! fun! Test_winfixwidth_non_leaf_frame()
    split
    topleft 11vnew
    let l:wid = win_getid()
--- 173,179 ----
  endf
  
  " Test that 'winfixwidth' will be respected even there is non-leaf frame
! func Test_winfixwidth_non_leaf_frame()
    split
    topleft 11vnew
    let l:wid = win_getid()
***************
*** 184,186 ****
--- 184,196 ----
    call assert_equal(11, winwidth(l:wid))
    %bwipe!
  endf
+ 
+ func Test_tabwin_close()
+   enew
+   let l:wid = win_getid()
+   tabedit
+   call win_execute(l:wid, 'close')
+   " Should not crash.
+   call assert_true(v:true)
+   %bwipe!
+ endfunc
*** ../vim-8.2.0136/src/window.c        2020-01-19 15:45:00.722541466 +0100
--- src/window.c        2020-01-20 21:39:53.012483595 +0100
***************
*** 3616,3621 ****
--- 3616,3624 ----
        return FAIL;
      first_tabpage->tp_topframe = topframe;
      curtab = first_tabpage;
+     curtab->tp_firstwin = firstwin;
+     curtab->tp_lastwin = lastwin;
+     curtab->tp_curwin = curwin;
  
      return OK;
  }
***************
*** 3854,3859 ****
--- 3857,3864 ----
            newtp->tp_next = tp->tp_next;
            tp->tp_next = newtp;
        }
+       newtp->tp_firstwin = newtp->tp_lastwin = newtp->tp_curwin = curwin;
+ 
        win_init_size();
        firstwin->w_winrow = tabline_height();
        win_comp_scroll(curwin);
*** ../vim-8.2.0136/src/version.c       2020-01-20 21:32:46.238275079 +0100
--- src/version.c       2020-01-20 21:41:54.571981285 +0100
***************
*** 744,745 ****
--- 744,747 ----
  {   /* Add new patch number below this line */
+ /**/
+     137,
  /**/

-- 
DENNIS: Look,  strange women lying on their backs in ponds handing out
        swords ... that's no basis for a system of government.  Supreme
        executive power derives from a mandate from the masses, not from some
        farcical aquatic ceremony.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- 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    ///

-- 
-- 
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/202001202045.00KKj5DL021190%40masaka.moolenaar.net.

Raspunde prin e-mail lui