summaryrefslogtreecommitdiff
path: root/src/testdir/test_bufwintabinfo.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-07-15 17:01:11 +0200
committerBram Moolenaar <Bram@vim.org>2018-07-15 17:01:11 +0200
commit7132ddc1014a4e1230f0080e418221e5843e1277 (patch)
tree639bf26cc5e7a66e8a6ac9776d8eff140fc1ee04 /src/testdir/test_bufwintabinfo.vim
parent44a693a1bdfe987edb649677c94c214f94b2aada (diff)
downloadvim-git-7132ddc1014a4e1230f0080e418221e5843e1277.tar.gz
patch 8.1.0187: getwininfo() and win_screenpos() return different numbersv8.1.0187
Problem: getwininfo() and win_screenpos() return different numbers. Solution: Add one to "wincol" and "winrow" from getwininfo().
Diffstat (limited to 'src/testdir/test_bufwintabinfo.vim')
-rw-r--r--src/testdir/test_bufwintabinfo.vim19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/testdir/test_bufwintabinfo.vim b/src/testdir/test_bufwintabinfo.vim
index d88b061ac..0e8c7d1dc 100644
--- a/src/testdir/test_bufwintabinfo.vim
+++ b/src/testdir/test_bufwintabinfo.vim
@@ -52,21 +52,22 @@ function Test_getbufwintabinfo()
let winlist = getwininfo()
call assert_equal(5, len(winlist))
call assert_equal(winwidth(1), winlist[0].width)
- call assert_equal(0, winlist[0].wincol)
- let tablineheight = winlist[0].winrow == 1 ? 1 : 0
- call assert_equal(tablineheight, winlist[0].winrow) " tabline adds one
+ call assert_equal(1, winlist[0].wincol)
+ " tabline adds one row in terminal, not in GUI
+ let tablineheight = winlist[0].winrow == 2 ? 1 : 0
+ call assert_equal(tablineheight + 1, winlist[0].winrow)
call assert_equal(winbufnr(2), winlist[1].bufnr)
call assert_equal(winheight(2), winlist[1].height)
- call assert_equal(0, winlist[1].wincol)
- call assert_equal(tablineheight + winheight(1) + 1, winlist[1].winrow)
+ call assert_equal(1, winlist[1].wincol)
+ call assert_equal(tablineheight + winheight(1) + 2, winlist[1].winrow)
call assert_equal(1, winlist[2].winnr)
- call assert_equal(tablineheight, winlist[2].winrow)
- call assert_equal(0, winlist[2].wincol)
+ call assert_equal(tablineheight + 1, winlist[2].winrow)
+ call assert_equal(1, winlist[2].wincol)
- call assert_equal(winlist[2].width + 1, winlist[3].wincol)
- call assert_equal(0, winlist[4].wincol)
+ call assert_equal(winlist[2].width + 2, winlist[3].wincol)
+ call assert_equal(1, winlist[4].wincol)
call assert_equal(1, winlist[0].tabnr)
call assert_equal(1, winlist[1].tabnr)