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 -- [email protected] -- 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    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202009041638.084GcRHf374658%40masaka.moolenaar.net.

Raspunde prin e-mail lui