mirror of
https://github.com/zoriya/auto-save.nvim.git
synced 2025-12-06 06:36:11 +00:00
Fix debounce_delay option not being read
When this file is loaded, `cnf` has default options
This commit is contained in:
@@ -112,10 +112,13 @@ function M.save(buf)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local save_func = (cnf.opts.debounce_delay > 0 and debounce(M.save, cnf.opts.debounce_delay) or M.save)
|
local save_func = nil
|
||||||
|
|
||||||
local function perform_save()
|
local function perform_save()
|
||||||
g.auto_save_abort = false
|
g.auto_save_abort = false
|
||||||
|
if save_func == nil then
|
||||||
|
save_func = (cnf.opts.debounce_delay > 0 and debounce(M.save, cnf.opts.debounce_delay) or M.save)
|
||||||
|
end
|
||||||
save_func()
|
save_func()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user