mirror of
https://github.com/neovim/neovim.git
synced 2026-07-22 00:51:33 +00:00
feat(eval)!: make Vim functions return inner window width and height (#19743)
In non-multigrid UI the only change is that the returned height now excludes winbar, and this is compatible with Vim. In multigrid UI this means the return value of these functions now reflect the space available for buffer lines in a window. No change in nvim_win_get_height() and nvim_win_get_width().
This commit is contained in:
@@ -7,6 +7,8 @@ local meths = helpers.meths
|
||||
local eq = helpers.eq
|
||||
local poke_eventloop = helpers.poke_eventloop
|
||||
local feed = helpers.feed
|
||||
local funcs = helpers.funcs
|
||||
local curwin = helpers.curwin
|
||||
local pcall_err = helpers.pcall_err
|
||||
|
||||
describe('winbar', function()
|
||||
@@ -48,6 +50,11 @@ describe('winbar', function()
|
||||
{3:~ }|
|
||||
|
|
||||
]])
|
||||
-- winbar is excluded from the heights returned by winheight() and getwininfo()
|
||||
eq(11, funcs.winheight(0))
|
||||
local win_info = funcs.getwininfo(curwin().id)[1]
|
||||
eq(11, win_info.height)
|
||||
eq(1, win_info.winbar)
|
||||
end)
|
||||
|
||||
it('works with custom \'fillchars\' value', function()
|
||||
|
||||
Reference in New Issue
Block a user