Skip to content

Commit

Permalink
Use correct path for cancel_defered_save trigger event
Browse files Browse the repository at this point in the history
  • Loading branch information
primeapple committed Oct 2, 2024
1 parent 0b0a0f1 commit 9ea9825
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lua/auto-save/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ function Config:handle_deprecations(custom_opts)
custom_opts["execution_message"] = nil
end

if custom_opts["cancel_defered_save"] then
if custom_opts["trigger_events"] and custom_opts["trigger_events"]["cancel_defered_save"] then
vim.notify(
"The `cancel_defered_save` config option in the auto-save.nvim plugin has been renamed to `cancel_deferred_save`.",
vim.log.levels.WARN
)
custom_opts["cancel_deferred_save"] = custom_opts["cancel_defered_save"]
custom_opts["cancel_defered_save"] = nil
custom_opts["trigger_events"]["cancel_deferred_save"] = custom_opts["trigger_events"]["cancel_defered_save"]
custom_opts["trigger_events"]["cancel_defered_save"] = nil
end

return custom_opts
Expand Down

0 comments on commit 9ea9825

Please sign in to comment.