mirror of
https://github.com/neovim/neovim.git
synced 2025-11-14 06:18:50 +00:00
test: typing for helpers.meths
This commit is contained in:
@@ -18,33 +18,33 @@ describe('screenpos() function', function()
|
||||
border = 'none',
|
||||
focusable = 1,
|
||||
}
|
||||
local float = meths.open_win(meths.create_buf(false, true), false, opts)
|
||||
local float = meths.nvim_open_win(meths.nvim_create_buf(false, true), false, opts)
|
||||
command('redraw')
|
||||
eq({ row = 7, col = 9, endcol = 9, curscol = 9 }, funcs.screenpos(float, 1, 1))
|
||||
|
||||
-- only left border
|
||||
opts.border = { '', '', '', '', '', '', '', '|' }
|
||||
meths.win_set_config(float, opts)
|
||||
meths.nvim_win_set_config(float, opts)
|
||||
command('redraw')
|
||||
eq({ row = 7, col = 10, endcol = 10, curscol = 10 }, funcs.screenpos(float, 1, 1))
|
||||
|
||||
-- only top border
|
||||
opts.border = { '', '_', '', '', '', '', '', '' }
|
||||
meths.win_set_config(float, opts)
|
||||
meths.nvim_win_set_config(float, opts)
|
||||
command('redraw')
|
||||
eq({ row = 8, col = 9, endcol = 9, curscol = 9 }, funcs.screenpos(float, 1, 1))
|
||||
|
||||
-- both left and top border
|
||||
opts.border = 'single'
|
||||
meths.win_set_config(float, opts)
|
||||
meths.nvim_win_set_config(float, opts)
|
||||
command('redraw')
|
||||
eq({ row = 8, col = 10, endcol = 10, curscol = 10 }, funcs.screenpos(float, 1, 1))
|
||||
end)
|
||||
|
||||
it('works for folded line with virt_lines attached to line above', function()
|
||||
meths.buf_set_lines(0, 0, -1, true, { 'aaa', 'bbb', 'ccc', 'ddd' })
|
||||
local ns = meths.create_namespace('')
|
||||
meths.buf_set_extmark(
|
||||
meths.nvim_buf_set_lines(0, 0, -1, true, { 'aaa', 'bbb', 'ccc', 'ddd' })
|
||||
local ns = meths.nvim_create_namespace('')
|
||||
meths.nvim_buf_set_extmark(
|
||||
0,
|
||||
ns,
|
||||
0,
|
||||
|
||||
Reference in New Issue
Block a user