mirror of
https://github.com/zoriya/auto-save.nvim.git
synced 2025-12-06 06:36:11 +00:00
fix: callbacks
Manually picked from https://github.com/Pocco81/auto-save.nvim/pull/67/, namely 6203ae6d23625b93e563b8893cefb99e55ecb06f.
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
local M = {}
|
||||
|
||||
local cnf = require("auto-save.config").opts
|
||||
|
||||
function M.set_of(list)
|
||||
local set = {}
|
||||
for i = 1, #list do
|
||||
@@ -17,6 +15,8 @@ function M.not_in(var, arr)
|
||||
end
|
||||
|
||||
function M.do_callback(callback_name)
|
||||
local cnf = require("auto-save.config").opts
|
||||
|
||||
if type(cnf.callbacks[callback_name]) == "function" then
|
||||
cnf.callbacks[callback_name]()
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user