From 0744e0d875110c6c4bf58060ea7f82bd1a2eb5a9 Mon Sep 17 00:00:00 2001 From: Ronnie Magatti Date: Sat, 13 Apr 2024 22:56:21 -0600 Subject: [PATCH] Execute AutoSaveSession on VimLeavePre instead Fixes #268 --- lua/auto-session/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/auto-session/init.lua b/lua/auto-session/init.lua index 2770474..ea2fb64 100644 --- a/lua/auto-session/init.lua +++ b/lua/auto-session/init.lua @@ -937,7 +937,7 @@ function SetupAutocmds() end, }) - vim.api.nvim_create_autocmd({ "VimLeave" }, { + vim.api.nvim_create_autocmd({ "VimLeavePre" }, { group = group, pattern = "*", callback = function()