patch 8.2.0137: crash when using win_execute() from a new tab
Problem: Crash when using win_execute() from a new tab.
Solution: Set the tp_*win pointers. (Ozaki Kiichi, closes #5512)
diff --git a/src/testdir/test_winbuf_close.vim b/src/testdir/test_winbuf_close.vim
index ee43540..7f5b80e 100644
--- a/src/testdir/test_winbuf_close.vim
+++ b/src/testdir/test_winbuf_close.vim
@@ -160,7 +160,7 @@
endfunction
" Test that 'winfixheight' will be respected even there is non-leaf frame
-fun! Test_winfixheight_non_leaf_frame()
+func Test_winfixheight_non_leaf_frame()
vsplit
botright 11new
let l:wid = win_getid()
@@ -173,7 +173,7 @@
endf
" Test that 'winfixwidth' will be respected even there is non-leaf frame
-fun! Test_winfixwidth_non_leaf_frame()
+func Test_winfixwidth_non_leaf_frame()
split
topleft 11vnew
let l:wid = win_getid()
@@ -184,3 +184,13 @@
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