fix: prevent double running of git command
Should improve loading times significantlymain
parent
86ce6f14ae
commit
bcdada28d2
|
|
@ -89,10 +89,6 @@ end
|
||||||
function M.setup(opts)
|
function M.setup(opts)
|
||||||
config.setup(opts)
|
config.setup(opts)
|
||||||
|
|
||||||
if M.session_exists() then
|
|
||||||
vim.g.persisted_exists = true
|
|
||||||
end
|
|
||||||
|
|
||||||
if
|
if
|
||||||
config.options.autosave
|
config.options.autosave
|
||||||
and (allow_dir() and not ignore_dir() and vim.g.persisting == nil)
|
and (allow_dir() and not ignore_dir() and vim.g.persisting == nil)
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,7 @@ function M.load_session(session, silent)
|
||||||
return echoerr("Error loading the session! ", result)
|
return echoerr("Error loading the session! ", result)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
vim.g.persisted_exists = true
|
||||||
vim.g.persisted_loaded_session = session
|
vim.g.persisted_loaded_session = session
|
||||||
vim.api.nvim_exec_autocmds("User", { pattern = "PersistedLoadPost", data = session })
|
vim.api.nvim_exec_autocmds("User", { pattern = "PersistedLoadPost", data = session })
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue