try to fix nvim hanging when it exits
parent
1934279d0b
commit
cf4c944b21
|
|
@ -113,6 +113,7 @@ end
|
|||
---Save the session
|
||||
---@param opts? { force?: boolean, session?: string }
|
||||
function M.save(opts)
|
||||
vim.schedule(function()
|
||||
opts = opts or {}
|
||||
|
||||
-- Do not save the session if should_save evals to false...unless it's forced
|
||||
|
|
@ -135,7 +136,6 @@ function M.save(opts)
|
|||
if type(config.save_pre) == "function" then
|
||||
config.save_pre()
|
||||
end
|
||||
vim.schedule(function()
|
||||
vim.api.nvim_command("wa")
|
||||
vim.api.nvim_command("mksession! " .. e(opts.session or vim.g.persisting_session or M.current()))
|
||||
end)
|
||||
|
|
|
|||
Loading…
Reference in New Issue