mirror of
https://github.com/neovim/neovim.git
synced 2026-04-20 06:20:53 +00:00
fix(api): reconfiguring float "relative" does not clear "win" (#34271)
Problem: Unable to change the "relative" of a flag after its target
"win" no longer exists.
Solution: Unset target window if it is not present in config and
reconfigured "relative" no longer expects a target window.
(cherry picked from commit 963308439a)
This commit is contained in:
committed by
github-actions[bot]
parent
f2c4305114
commit
0d66963089
@@ -378,6 +378,21 @@ describe('float window', function()
|
||||
)
|
||||
end)
|
||||
|
||||
it('no error message when reconfig relative field on closed win', function()
|
||||
command('split')
|
||||
local winid = api.nvim_open_win(0, false, {
|
||||
relative = 'win',
|
||||
width = 1,
|
||||
height = 1,
|
||||
col = 1,
|
||||
row = 1,
|
||||
})
|
||||
eq(1001, api.nvim_win_get_config(winid).win)
|
||||
command('close')
|
||||
api.nvim_win_set_config(winid, { relative = 'editor', row = 1, col = 1 })
|
||||
eq(nil, api.nvim_win_get_config(winid).win)
|
||||
end)
|
||||
|
||||
it('is not operated on by windo when non-focusable #15374', function()
|
||||
command([[
|
||||
let winids = []
|
||||
|
||||
Reference in New Issue
Block a user