diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-11-27 19:45:49 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-11-27 19:45:49 +0000 |
commit | 3da8597fc07505c0f8839b0834aafe1c10ffb456 (patch) | |
tree | f8a2ef6f53114411a856dd25bff8c9e502a1647f /src/testdir/test_bufline.vim | |
parent | 502e91756e99181d5fe668fad2e868dc7f3f4fea (diff) |
patch 9.0.0961: using deletebufline() may jump to another windowv9.0.0961
Problem: Using deletebufline() may jump to another window.
Solution: Do not use a window where the buffer was only in the past.
(closes #11594)
Diffstat (limited to 'src/testdir/test_bufline.vim')
-rw-r--r-- | src/testdir/test_bufline.vim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/testdir/test_bufline.vim b/src/testdir/test_bufline.vim index 9e4402f79e..4ada241d1d 100644 --- a/src/testdir/test_bufline.vim +++ b/src/testdir/test_bufline.vim @@ -288,6 +288,20 @@ func Test_deletebufline_select_mode() bwipe! endfunc +func Test_deletebufline_popup_window() + let popupID = popup_create('foo', {}) + let bufnr = winbufnr(popupID) + + " Check that deletebufline() brings us back to the same window. + new + let winid_before = win_getid() + call deletebufline(bufnr, 1, '$') + call assert_equal(winid_before, win_getid()) + bwipe + + call popup_close(popupID) +endfunc + func Test_setbufline_startup_nofile() let before =<< trim [CODE] set shortmess+=F |