Mercurial > vim
diff src/testdir/test_popupwin.vim @ 16829:5cebaecad422 v8.1.1416
patch 8.1.1416: popup_getposition() not implemented yet
commit https://github.com/vim/vim/commit/bc133543b8b0ebb1d8624e37d840b739eb00f3f3
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed May 29 20:26:46 2019 +0200
patch 8.1.1416: popup_getposition() not implemented yet
Problem: Popup_getposition() not implemented yet.
Solution: Implement it. (Yasuhiro Matsumoto, closes https://github.com/vim/vim/issues/4449)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 29 May 2019 20:30:05 +0200 |
parents | 069ee8dc8c8d |
children | 18593056d8f1 |
line wrap: on
line diff
--- a/src/testdir/test_popupwin.vim +++ b/src/testdir/test_popupwin.vim @@ -159,3 +159,20 @@ func Test_popup_move() bwipe! endfunc + +func Test_popup_getposition() + let winid = popup_create('hello', { + \ 'line': 2, + \ 'col': 3, + \ 'minwidth': 10, + \ 'minheight': 11, + \}) + redraw + let res = popup_getposition(winid) + call assert_equal(2, res.line) + call assert_equal(3, res.col) + call assert_equal(10, res.width) + call assert_equal(11, res.height) + + call popup_close(winid) +endfunc