Mercurial > vim
diff src/testdir/test_bufwintabinfo.vim @ 14337:48287f1fc8a1 v8.1.0184
patch 8.1.0184: not easy to figure out the window layout
commit https://github.com/vim/vim/commit/b6959a8e06cef6d2126b030b2f8acd49457a3582
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jul 14 21:41:44 2018 +0200
patch 8.1.0184: not easy to figure out the window layout
Problem: Not easy to figure out the window layout.
Solution: Add "wincol" and "winrow" to what getwininfo() returns.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 14 Jul 2018 21:45:05 +0200 |
parents | 58cce40c965b |
children | 3224a9aebc46 |
line wrap: on
line diff
--- a/src/testdir/test_bufwintabinfo.vim +++ b/src/testdir/test_bufwintabinfo.vim @@ -46,17 +46,34 @@ function Test_getbufwintabinfo() let w2_id = win_getid() tabnew | let w3_id = win_getid() new | let w4_id = win_getid() - new | let w5_id = win_getid() + vert new | let w5_id = win_getid() call setwinvar(0, 'signal', 'green') tabfirst let winlist = getwininfo() call assert_equal(5, len(winlist)) + call assert_equal(winwidth(1), winlist[0].width) + call assert_equal(0, winlist[0].wincol) + call assert_equal(1, winlist[0].winrow) " tabline adds one + 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(winheight(1) + 2, winlist[1].winrow) + call assert_equal(1, winlist[2].winnr) + call assert_equal(1, winlist[2].winrow) + call assert_equal(0, winlist[2].wincol) + + call assert_equal(winlist[2].width + 1, winlist[3].wincol) + call assert_equal(0, winlist[4].wincol) + + call assert_equal(1, winlist[0].tabnr) + call assert_equal(1, winlist[1].tabnr) + call assert_equal(2, winlist[2].tabnr) call assert_equal(2, winlist[3].tabnr) + call assert_equal(2, winlist[4].tabnr) + call assert_equal('green', winlist[2].variables.signal) - call assert_equal(winwidth(1), winlist[0].width) call assert_equal(w4_id, winlist[3].winid) let winfo = getwininfo(w5_id)[0] call assert_equal(2, winfo.tabnr)