mirror of
https://github.com/neovim/neovim.git
synced 2025-12-05 22:22:44 +00:00
Merge pull request #15516 from bfredl/keyset
refactor(api): Represent option dicts as a structs in C and reduce conversion overhead from lua
This commit is contained in:
@@ -1529,7 +1529,7 @@ describe('float window', function()
|
||||
|
||||
it('API has proper error messages', function()
|
||||
local buf = meths.create_buf(false,false)
|
||||
eq("Invalid key 'bork'",
|
||||
eq("Invalid key: 'bork'",
|
||||
pcall_err(meths.open_win,buf, false, {width=20,height=2,bork=true}))
|
||||
eq("'win' key is only valid with relative='win'",
|
||||
pcall_err(meths.open_win,buf, false, {width=20,height=2,relative='editor',row=0,col=0,win=0}))
|
||||
@@ -1542,13 +1542,15 @@ describe('float window', function()
|
||||
eq("'relative' requires 'row'/'col' or 'bufpos'",
|
||||
pcall_err(meths.open_win,buf, false, {width=20,height=2,relative='editor'}))
|
||||
eq("'width' key must be a positive Integer",
|
||||
pcall_err(meths.open_win,buf, false, {width=-1,height=2,relative='editor'}))
|
||||
pcall_err(meths.open_win,buf, false, {width=-1,height=2,relative='editor', row=0, col=0}))
|
||||
eq("'height' key must be a positive Integer",
|
||||
pcall_err(meths.open_win,buf, false, {width=20,height=-1,relative='editor'}))
|
||||
pcall_err(meths.open_win,buf, false, {width=20,height=-1,relative='editor', row=0, col=0}))
|
||||
eq("'height' key must be a positive Integer",
|
||||
pcall_err(meths.open_win,buf, false, {width=20,height=0,relative='editor'}))
|
||||
eq("Must specify 'width' and 'height'",
|
||||
pcall_err(meths.open_win,buf, false, {relative='editor'}))
|
||||
pcall_err(meths.open_win,buf, false, {width=20,height=0,relative='editor', row=0, col=0}))
|
||||
eq("Must specify 'width'",
|
||||
pcall_err(meths.open_win,buf, false, {relative='editor', row=0, col=0}))
|
||||
eq("Must specify 'height'",
|
||||
pcall_err(meths.open_win,buf, false, {relative='editor', row=0, col=0, width=2}))
|
||||
end)
|
||||
|
||||
it('can be placed relative window or cursor', function()
|
||||
|
||||
Reference in New Issue
Block a user