mirror of
https://github.com/neovim/neovim.git
synced 2025-12-12 01:22:41 +00:00
fix(float): improve error message when reconfig failed (#25076)
Problem: The current error message isn't very accurate. Solution: Improve the error message.
This commit is contained in:
@@ -325,6 +325,27 @@ describe('float window', function()
|
||||
eq(12, pos[2])
|
||||
end)
|
||||
|
||||
it('error message when reconfig missing relative field', function()
|
||||
local bufnr = api.nvim_create_buf(false, true)
|
||||
local opts = {
|
||||
width = 10,
|
||||
height = 10,
|
||||
col = 5,
|
||||
row = 5,
|
||||
relative = 'editor',
|
||||
style = 'minimal',
|
||||
}
|
||||
local win_id = api.nvim_open_win(bufnr, true, opts)
|
||||
eq(
|
||||
"Missing 'relative' field when reconfiguring floating window 1001",
|
||||
pcall_err(api.nvim_win_set_config, win_id, {
|
||||
width = 3,
|
||||
height = 3,
|
||||
row = 10,
|
||||
col = 10,
|
||||
}))
|
||||
end)
|
||||
|
||||
it('is not operated on by windo when non-focusable #15374', function()
|
||||
command([[
|
||||
let winids = []
|
||||
|
||||
Reference in New Issue
Block a user