forked from aniani/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 #6863)
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user