aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <janedmundlazo@hotmail.com>2018-08-15 20:33:00 -0400
committerJan Edmund Lazo <janedmundlazo@hotmail.com>2018-08-15 20:37:53 -0400
commit2036d0428472b2453cc459a9ab27d39ac0063d2a (patch)
treea55d86ccccffb29fb57f970ea506083b89273c86 /src/nvim/testdir
parentb89c08901c1e619b9aeca6f109f6ba73a7be4e9f (diff)
downloadrneovim-2036d0428472b2453cc459a9ab27d39ac0063d2a.tar.gz
rneovim-2036d0428472b2453cc459a9ab27d39ac0063d2a.tar.bz2
rneovim-2036d0428472b2453cc459a9ab27d39ac0063d2a.zip
vim-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. https://github.com/vim/vim/commit/b6959a8e06cef6d2126b030b2f8acd49457a3582
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_bufwintabinfo.vim21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/nvim/testdir/test_bufwintabinfo.vim b/src/nvim/testdir/test_bufwintabinfo.vim
index a592cd7b11..478f7ac9bc 100644
--- a/src/nvim/testdir/test_bufwintabinfo.vim
+++ b/src/nvim/testdir/test_bufwintabinfo.vim
@@ -39,17 +39,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)