mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
fix(api): win_set_config update statuslines after removing splits
Problem: nvim_win_set_config does not update statuslines after removing a split. Solution: call last_status. Didn't realize this was missing in the original nvim_win_set_config for splits PR. As it can only be done for the current tabpage, do it if win_tp == curtab; enter_tabpage will eventually call last_status anyway when the user enters another tabpage.
This commit is contained in:
@@ -2379,6 +2379,28 @@ describe('API/win', function()
|
||||
)
|
||||
eq(cur_win, api.nvim_get_current_win())
|
||||
end)
|
||||
|
||||
it('updates statusline when moving bottom split', function()
|
||||
local screen = Screen.new(10, 10)
|
||||
screen:set_default_attr_ids({
|
||||
[0] = { bold = true, foreground = Screen.colors.Blue }, -- NonText
|
||||
[1] = { bold = true, reverse = true }, -- StatusLine
|
||||
})
|
||||
screen:attach()
|
||||
exec([[
|
||||
set laststatus=0
|
||||
belowright split
|
||||
call nvim_win_set_config(0, #{split: 'above', win: win_getid(winnr('#'))})
|
||||
]])
|
||||
screen:expect([[
|
||||
^ |
|
||||
{0:~ }|*3
|
||||
{1:[No Name] }|
|
||||
|
|
||||
{0:~ }|*3
|
||||
|
|
||||
]])
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('get_config', function()
|
||||
|
||||
Reference in New Issue
Block a user