diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-07-07 18:28:14 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-07-07 18:28:14 +0200 |
commit | b3d17a20d243f65bcfe23de08b7afd948c5132c2 (patch) | |
tree | d5cf97466bfab6199a02fa2db200bee4bf054337 /src/testdir/test_cursor_func.vim | |
parent | 5b19e5b919ec568792e2e2301899f0e58cf9e550 (diff) |
patch 8.1.1645: cannot use a popup window for a balloonv8.1.1645
Problem: Cannot use a popup window for a balloon.
Solution: Add popup_beval(). Add the "mousemoved" property. Add the
screenpos() function.
Diffstat (limited to 'src/testdir/test_cursor_func.vim')
-rw-r--r-- | src/testdir/test_cursor_func.vim | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/testdir/test_cursor_func.vim b/src/testdir/test_cursor_func.vim index 12319577c6..0f638b3575 100644 --- a/src/testdir/test_cursor_func.vim +++ b/src/testdir/test_cursor_func.vim @@ -72,3 +72,31 @@ func Test_curswant_with_cursorline() call assert_equal(6, winsaveview().curswant) quit! endfunc + +func Test_screenpos() + rightbelow new + rightbelow 20vsplit + call setline(1, ["\tsome text", "long wrapping line here", "next line"]) + redraw + let winid = win_getid() + let [winrow, wincol] = win_screenpos(winid) + call assert_equal({'row': winrow, + \ 'col': wincol + 0, + \ 'curscol': wincol + 7, + \ 'endcol': wincol + 7}, screenpos(winid, 1, 1)) + call assert_equal({'row': winrow, + \ 'col': wincol + 13, + \ 'curscol': wincol + 13, + \ 'endcol': wincol + 13}, screenpos(winid, 1, 7)) + call assert_equal({'row': winrow + 2, + \ 'col': wincol + 1, + \ 'curscol': wincol + 1, + \ 'endcol': wincol + 1}, screenpos(winid, 2, 22)) + setlocal number + call assert_equal({'row': winrow + 3, + \ 'col': wincol + 9, + \ 'curscol': wincol + 9, + \ 'endcol': wincol + 9}, screenpos(winid, 2, 22)) + close + bwipe! +endfunc |