diff src/testdir/test_popupwin.vim @ 17043:d99805d25b42 v8.1.1521

patch 8.1.1521: when a popup window is closed the buffer remains commit https://github.com/vim/vim/commit/7c7f01e2b260c75d9996ca9ab621119eafe13a63 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jun 12 21:06:32 2019 +0200 patch 8.1.1521: when a popup window is closed the buffer remains Problem: When a popup window is closed the buffer remains. Solution: Wipe out the buffer.
author Bram Moolenaar <Bram@vim.org>
date Wed, 12 Jun 2019 21:15:07 +0200
parents 9297877074a3
children 7fe328ad5573
line wrap: on
line diff
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -272,12 +272,17 @@ endfunc
 func Test_popup_in_tab()
   " default popup is local to tab, not visible when in other tab
   let winid = popup_create("text", {})
+  let bufnr = winbufnr(winid)
   call assert_equal(1, popup_getpos(winid).visible)
   tabnew
   call assert_equal(0, popup_getpos(winid).visible)
   quit
   call assert_equal(1, popup_getpos(winid).visible)
+
+  call assert_equal(1, bufexists(bufnr))
   call popup_clear()
+  " buffer is gone now
+  call assert_equal(0, bufexists(bufnr))
 
   " global popup is visible in any tab
   let winid = popup_create("text", {'tab': -1})