diff src/testdir/test_popupwin.vim @ 16892:60c9ac14a2ec v8.1.1447

patch 8.1.1447: not allowed to create an empty popup commit https://github.com/vim/vim/commit/7b29dd850752b975baef47b66c590f5e978ad847 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jun 2 13:22:11 2019 +0200 patch 8.1.1447: not allowed to create an empty popup Problem: Not allowed to create an empty popup. Solution: Remove restriction that there is some text. (closes https://github.com/vim/vim/issues/4470)
author Bram Moolenaar <Bram@vim.org>
date Sun, 02 Jun 2019 13:30:05 +0200
parents 5131023c5728
children 236c182c6300
line wrap: on
line diff
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -596,3 +596,17 @@ func Test_popup_close_callback()
   call popup_close(winid, 'done')
   call assert_equal('done', g:result)
 endfunc
+
+func Test_popup_empty()
+  let winid = popup_create('', {'padding': [2,2,2,2]})
+  redraw
+  let pos = popup_getpos(winid)
+  call assert_equal(4, pos.width)
+  call assert_equal(5, pos.height)
+
+  let winid = popup_create([], {'border': []})
+  redraw
+  let pos = popup_getpos(winid)
+  call assert_equal(2, pos.width)
+  call assert_equal(3, pos.height)
+endfunc