diff --git a/lua/persisted/init.lua b/lua/persisted/init.lua index 5c977c4..ac4db48 100644 --- a/lua/persisted/init.lua +++ b/lua/persisted/init.lua @@ -247,7 +247,7 @@ function M.save(opt, dir) end -- Do not save the session if the callback returns false...unless it's forced - if type(config.options.should_autosave) == "function" and not config.options.should_autosave() then + if not opt.force and type(config.options.should_autosave) == "function" and not config.options.should_autosave() then return end end