test: add tests for oil.select
This commit is contained in:
parent
0215ed3b0b
commit
a82503cd79
2 changed files with 71 additions and 3 deletions
|
|
@ -24,12 +24,19 @@ M.reset_editor = function()
|
|||
end
|
||||
|
||||
M.wait_for_autocmd = a.wrap(function(autocmd, cb)
|
||||
vim.api.nvim_create_autocmd(autocmd, {
|
||||
local opts = {
|
||||
pattern = "*",
|
||||
nested = true,
|
||||
once = true,
|
||||
callback = vim.schedule_wrap(cb),
|
||||
})
|
||||
}
|
||||
if type(autocmd) == "table" then
|
||||
opts = vim.tbl_extend("force", opts, autocmd)
|
||||
autocmd = autocmd[1]
|
||||
opts[1] = nil
|
||||
end
|
||||
opts.callback = vim.schedule_wrap(cb)
|
||||
|
||||
vim.api.nvim_create_autocmd(autocmd, opts)
|
||||
end, 2)
|
||||
|
||||
---@param actions string[]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue