To: vim_dev@googlegroups.com Subject: Patch 8.2.1591 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.1591 Problem: Using winheight('.') in tests works but is wrong. Solution: Use winheight(0). (issue #6863) Files: src/testdir/test_functions.vim, src/testdir/test_quickfix.vim *** ../vim-8.2.1590/src/testdir/test_functions.vim 2020-08-28 22:24:40.660494318 +0200 --- src/testdir/test_functions.vim 2020-09-04 18:30:52.521101867 +0200 *************** *** 1438,1456 **** let prev_id = win_getid() wincmd j ! let wh = winheight('.') 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('.')) let dum1_id = win_getid() wincmd h ! let wh = winheight('.') 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('.')) bwipe! call win_gotoid(prev_id) --- 1438,1456 ---- let prev_id = win_getid() wincmd j ! 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(0)) let dum1_id = win_getid() wincmd h ! 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(0)) bwipe! call win_gotoid(prev_id) *** ../vim-8.2.1590/src/testdir/test_quickfix.vim 2020-08-31 22:16:04.803294683 +0200 --- src/testdir/test_quickfix.vim 2020-09-04 18:31:11.653054377 +0200 *************** *** 261,273 **** " Open the window Xopen 5 call assert_true(winnr('$') == 2 && getline('.') ==# '|| non-error 1' ! \ && winheight('.') == 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 && \ getline('.') ==# '|| non-error 1') " :cnext in quickfix window should move to the next entry --- 261,273 ---- " Open the window Xopen 5 call assert_true(winnr('$') == 2 && getline('.') ==# '|| non-error 1' ! \ && 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(0) == 7 && \ getline('.') ==# '|| non-error 1') " :cnext in quickfix window should move to the next entry *** ../vim-8.2.1590/src/version.c 2020-09-04 18:35:23.544429716 +0200 --- src/version.c 2020-09-04 18:37:28.160046093 +0200 *************** *** 756,757 **** --- 756,759 ---- { /* Add new patch number below this line */ + /**/ + 1591, /**/ -- Some say the world will end in fire; some say in segfaults. I say it will end in a curly bracket. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///