comparison 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
comparison
equal deleted inserted replaced
17042:ea951d5610a5 17043:d99805d25b42
270 endfunc 270 endfunc
271 271
272 func Test_popup_in_tab() 272 func Test_popup_in_tab()
273 " default popup is local to tab, not visible when in other tab 273 " default popup is local to tab, not visible when in other tab
274 let winid = popup_create("text", {}) 274 let winid = popup_create("text", {})
275 let bufnr = winbufnr(winid)
275 call assert_equal(1, popup_getpos(winid).visible) 276 call assert_equal(1, popup_getpos(winid).visible)
276 tabnew 277 tabnew
277 call assert_equal(0, popup_getpos(winid).visible) 278 call assert_equal(0, popup_getpos(winid).visible)
278 quit 279 quit
279 call assert_equal(1, popup_getpos(winid).visible) 280 call assert_equal(1, popup_getpos(winid).visible)
280 call popup_clear() 281
282 call assert_equal(1, bufexists(bufnr))
283 call popup_clear()
284 " buffer is gone now
285 call assert_equal(0, bufexists(bufnr))
281 286
282 " global popup is visible in any tab 287 " global popup is visible in any tab
283 let winid = popup_create("text", {'tab': -1}) 288 let winid = popup_create("text", {'tab': -1})
284 call assert_equal(1, popup_getpos(winid).visible) 289 call assert_equal(1, popup_getpos(winid).visible)
285 tabnew 290 tabnew