aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-12-02 11:15:47 +0800
committerGitHub <noreply@github.com>2022-12-02 11:15:47 +0800
commitfacfc88b4ca004cf1db9621ef334c0ccf0ba4965 (patch)
tree5c3917596a4540730ee7a7017d2f1b64760a2bca /src/nvim/testdir
parent61e99217e68498e757b9f8b0c70978a9635ccbfa (diff)
parent47d3d0102fffbfd52b950c521e5d1e443ac7885f (diff)
downloadrneovim-facfc88b4ca004cf1db9621ef334c0ccf0ba4965.tar.gz
rneovim-facfc88b4ca004cf1db9621ef334c0ccf0ba4965.tar.bz2
rneovim-facfc88b4ca004cf1db9621ef334c0ccf0ba4965.zip
Merge pull request #21262 from zeertzjq/vim-8.2.1748
vim-patch:8.2.1748: closing split window in other tab may cause a crash
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_winbuf_close.vim18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_winbuf_close.vim b/src/nvim/testdir/test_winbuf_close.vim
index 643c1068bd..26b4ba8778 100644
--- a/src/nvim/testdir/test_winbuf_close.vim
+++ b/src/nvim/testdir/test_winbuf_close.vim
@@ -192,7 +192,23 @@ func Test_tabwin_close()
call win_execute(l:wid, 'close')
" Should not crash.
call assert_true(v:true)
- %bwipe!
+
+ " This tests closing a window in another tab, while leaving the tab open
+ " i.e. two windows in another tab.
+ tabedit
+ let w:this_win = 42
+ new
+ let othertab_wid = win_getid()
+ tabprevious
+ call win_execute(othertab_wid, 'q')
+ " drawing the tabline helps check that the other tab's windows and buffers
+ " are still valid
+ redrawtabline
+ " but to be certain, ensure we can focus the other tab too
+ tabnext
+ call assert_equal(42, w:this_win)
+
+ bwipe!
endfunc
" Test when closing a split window (above/below) restores space to the window