Skip to content

Commit

Permalink
Do not fail on trigger_eventspattern
Browse files Browse the repository at this point in the history
  • Loading branch information
Ltrlg committed Nov 4, 2024
1 parent 5fbcaac commit 36d8416
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/auto-save/utils/autocommands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ end
--- @param trigger_events TriggerEvent[]?
M.create_autocmd_for_trigger_events = function(trigger_events, autocmd_opts)
if trigger_events ~= nil then
for _, event in pairs(trigger_events) do
for _, event in ipairs(trigger_events) do
local parsed_event = parse_trigger_event(event)
local autocmd_opts_with_pattern = vim.tbl_extend("force", autocmd_opts, { pattern = parsed_event.pattern })
api.nvim_create_autocmd(parsed_event[1], autocmd_opts_with_pattern)
Expand Down

0 comments on commit 36d8416

Please sign in to comment.