Mercurial > vim
diff src/testdir/test_window_cmd.vim @ 12977:2d817fd289ba v8.0.1364
patch 8.0.1364: there is no easy way to get the window position
commit https://github.com/vim/vim/commit/22044dc31788d9f1c2da7725269884d9923b4795
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Dec 2 15:43:37 2017 +0100
patch 8.0.1364: there is no easy way to get the window position
Problem: There is no easy way to get the window position.
Solution: Add win_screenpos().
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 02 Dec 2017 15:45:04 +0100 |
parents | 7d7835ab8b37 |
children | 50aa6da392ce |
line wrap: on
line diff
--- a/src/testdir/test_window_cmd.vim +++ b/src/testdir/test_window_cmd.vim @@ -362,6 +362,19 @@ func Test_equalalways_on_close() set equalalways& endfunc +func Test_win_screenpos() + call assert_equal(1, winnr('$')) + split + vsplit + 10wincmd _ + 30wincmd | + call assert_equal([1, 1], win_screenpos(1)) + call assert_equal([1, 32], win_screenpos(2)) + call assert_equal([12, 1], win_screenpos(3)) + call assert_equal([0, 0], win_screenpos(4)) + only +endfunc + func Test_window_jump_tag() help /iccf