diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-05-20 20:33:31 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-05-21 20:04:39 -0400 |
commit | 4dadbe64a03b67b1c61b1ed4a8fcdff085fa506d (patch) | |
tree | 2960ccb9d8af34991a9e22594f05d051425c657f | |
parent | 994cc931d1d1a05fc8a2aa6f384432f7a5fc4825 (diff) | |
download | rneovim-4dadbe64a03b67b1c61b1ed4a8fcdff085fa506d.tar.gz rneovim-4dadbe64a03b67b1c61b1ed4a8fcdff085fa506d.tar.bz2 rneovim-4dadbe64a03b67b1c61b1ed4a8fcdff085fa506d.zip |
vim-patch:8.2.1591: using winheight('.') in tests works but is wrong
Problem: Using winheight('.') in tests works but is wrong.
Solution: Use winheight(0). (issue vim/vim#6863)
https://github.com/vim/vim/commit/c05d1c043a25c7a52dbf0a740d3f715a9d2691f7
-rw-r--r-- | src/nvim/testdir/test_functions.vim | 8 | ||||
-rw-r--r-- | src/nvim/testdir/test_quickfix.vim | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim index 93f567b3a0..15b5bffd81 100644 --- a/src/nvim/testdir/test_functions.vim +++ b/src/nvim/testdir/test_functions.vim @@ -319,19 +319,19 @@ func Test_setbufvar_options() let prev_id = win_getid() wincmd j - let wh = winheight('.') + let wh = winheight(0) let dummy_buf = bufnr('dummy_buf1', v:true) call setbufvar(dummy_buf, '&buftype', 'nofile') execute 'belowright vertical split #' . dummy_buf - call assert_equal(wh, winheight('.')) + call assert_equal(wh, winheight(0)) let dum1_id = win_getid() wincmd h - let wh = winheight('.') + let wh = winheight(0) let dummy_buf = bufnr('dummy_buf2', v:true) call setbufvar(dummy_buf, '&buftype', 'nofile') execute 'belowright vertical split #' . dummy_buf - call assert_equal(wh, winheight('.')) + call assert_equal(wh, winheight(0)) bwipe! call win_gotoid(prev_id) diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim index 8b078281e8..bf15f7f52b 100644 --- a/src/nvim/testdir/test_quickfix.vim +++ b/src/nvim/testdir/test_quickfix.vim @@ -261,13 +261,13 @@ func XwindowTests(cchar) " Open the window Xopen 5 call assert_true(winnr('$') == 2 && getline('.') ==# '|| non-error 1' - \ && winheight('.') == 5) + \ && winheight(0) == 5) " Opening the window again, should move the cursor to that window wincmd t Xopen 7 call assert_true(winnr('$') == 2 && winnr() == 2 && - \ winheight('.') == 7 && + \ winheight(0) == 7 && \ getline('.') ==# '|| non-error 1') " :cnext in quickfix window should move to the next entry |