fix(event): use tbl_contains instead of list_contains

This commit is contained in:
Folke Lemaitre 2023-10-06 15:48:41 +02:00
parent 58e954a735
commit 2b2adb9d4d
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ function M.trigger(opts)
local done = {} ---@type table<string,true> local done = {} ---@type table<string,true>
for _, autocmd in ipairs(vim.api.nvim_get_autocmds({ event = opts.event, pattern = opts.pattern })) do for _, autocmd in ipairs(vim.api.nvim_get_autocmds({ event = opts.event, pattern = opts.pattern })) do
local id = autocmd.event .. ":" .. (autocmd.group or "") ---@type string local id = autocmd.event .. ":" .. (autocmd.group or "") ---@type string
local skip = done[id] or (opts.exclude and vim.list_contains(opts.exclude, autocmd.group)) local skip = done[id] or (opts.exclude and vim.tbl_contains(opts.exclude, autocmd.group))
done[id] = true done[id] = true
if autocmd.group and not skip then if autocmd.group and not skip then
if Config.options.debug then if Config.options.debug then