summaryrefslogtreecommitdiff
path: root/src/testdir/test_window_cmd.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-12-02 15:43:37 +0100
committerBram Moolenaar <Bram@vim.org>2017-12-02 15:43:37 +0100
commit22044dc31788d9f1c2da7725269884d9923b4795 (patch)
tree494741760117a459b7dd197e2bcb1e3ed9d87cc5 /src/testdir/test_window_cmd.vim
parentaf903e5d490ec9c6c49079f67de7e92e3c35a725 (diff)
downloadvim-git-22044dc31788d9f1c2da7725269884d9923b4795.tar.gz
patch 8.0.1364: there is no easy way to get the window positionv8.0.1364
Problem: There is no easy way to get the window position. Solution: Add win_screenpos().
Diffstat (limited to 'src/testdir/test_window_cmd.vim')
-rw-r--r--src/testdir/test_window_cmd.vim13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/testdir/test_window_cmd.vim b/src/testdir/test_window_cmd.vim
index 49bd9fa68..067f09cbc 100644
--- 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