mirror of
https://github.com/neovim/neovim.git
synced 2026-03-28 19:32:01 +00:00
fix(api): style=minimal not applied immediately for unmoved split
Problem: nvim_win_set_config with style="minimal" does not take immediate effect when a split is not moved. Solution: don't skip nvim_win_set_config's epilogue when only a resize may be needed. De-duplicate resize logic and remove unnecessary redraw. (win_set*_win already handles that)
This commit is contained in:
@@ -2495,6 +2495,12 @@ describe('API/win', function()
|
||||
"non-float with 'win' requires at least 'split' or 'vertical'",
|
||||
pcall_err(api.nvim_win_set_config, 0, { win = 0, relative = '' })
|
||||
)
|
||||
|
||||
-- "minimal" style takes effect immediately for a split.
|
||||
api.nvim_set_option_value('cursorline', true, { win = win, scope = 'local' })
|
||||
eq(true, api.nvim_get_option_value('cursorline', { win = win }))
|
||||
api.nvim_win_set_config(win, { style = 'minimal' })
|
||||
eq(false, api.nvim_get_option_value('cursorline', { win = win }))
|
||||
end)
|
||||
|
||||
it('creates top-level splits', function()
|
||||
|
||||
Reference in New Issue
Block a user