From b4e09a639af14bdf606bf29e51eaea93a4ece17b Mon Sep 17 00:00:00 2001 From: anhoder Date: Thu, 29 Feb 2024 17:04:48 +0800 Subject: [PATCH] fix: force save (#112) --- lua/persisted/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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