mirror of
https://github.com/neovim/neovim.git
synced 2026-04-20 22:35:33 +00:00
fix(api): don't config split as floatwin relative to itself
Problem: possible to configure a split as a floatwin with relative=win that is relative to itself. Solution: fix the check. Not caused by this PR; just something I noticed when about to fix the validation logic.
This commit is contained in:
@@ -11191,6 +11191,9 @@ describe('float window', function()
|
||||
local winid = api.nvim_open_win(buf, false, config)
|
||||
api.nvim_set_current_win(winid)
|
||||
eq('floating window cannot be relative to itself', pcall_err(api.nvim_win_set_config, winid, config))
|
||||
-- Also when configuring split into float.
|
||||
command('split')
|
||||
eq('floating window cannot be relative to itself', pcall_err(api.nvim_win_set_config, 0, config))
|
||||
end)
|
||||
|
||||
it('bufpos out of range', function()
|
||||
|
||||
Reference in New Issue
Block a user