# HG changeset patch # User Bram Moolenaar # Date 1599237905 -7200 # Node ID c67a9d3b3683d086ece20e1fb56c94c3386e21db # Parent a7650f20d72eb760ad6433c998c05eb3f0259120 patch 8.2.1591: using winheight('.') in tests works but is wrong Commit: https://github.com/vim/vim/commit/c05d1c043a25c7a52dbf0a740d3f715a9d2691f7 Author: Bram Moolenaar Date: Fri Sep 4 18:38:06 2020 +0200 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 https://github.com/vim/vim/issues/6863) diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim --- a/src/testdir/test_functions.vim +++ b/src/testdir/test_functions.vim @@ -1438,19 +1438,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) eval 'nofile'->setbufvar(dummy_buf, '&buftype') 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/testdir/test_quickfix.vim b/src/testdir/test_quickfix.vim --- a/src/testdir/test_quickfix.vim +++ b/src/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 diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -755,6 +755,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1591, +/**/ 1590, /**/ 1589,