chore: misc updates

main
olimorris 2022-08-16 08:25:11 +01:00
parent 7d2a0ac661
commit dafb7a9e43
2 changed files with 4 additions and 0 deletions

View File

@ -5,6 +5,8 @@
<h1 align="center">Persisted.nvim</h1> <h1 align="center">Persisted.nvim</h1>
<p align="center"> <p align="center">
<a href="https://github.com/olimorris/persisted.nvim/stargazers"><img src="https://img.shields.io/github/stars/olimorris/persisted.nvim?color=c678dd&logoColor=e06c75&style=for-the-badge"></a>
<a href="https://github.com/olimorris/persisted.nvim/issues"><img src="https://img.shields.io/github/issues/olimorris/persisted.nvim?color=%23d19a66&style=for-the-badge"></a>
<a href="https://github.com/olimorris/persisted.nvim/blob/main/LICENSE"><img src="https://img.shields.io/github/license/olimorris/persisted.nvim?style=for-the-badge"></a> <a href="https://github.com/olimorris/persisted.nvim/blob/main/LICENSE"><img src="https://img.shields.io/github/license/olimorris/persisted.nvim?style=for-the-badge"></a>
<a href="https://github.com/olimorris/persisted.nvim/actions/workflows/ci.yml"><img src="https://img.shields.io/github/workflow/status/olimorris/persisted.nvim/Tests?label=tests&style=for-the-badge"></a> <a href="https://github.com/olimorris/persisted.nvim/actions/workflows/ci.yml"><img src="https://img.shields.io/github/workflow/status/olimorris/persisted.nvim/Tests?label=tests&style=for-the-badge"></a>
</p> </p>

View File

@ -82,10 +82,12 @@ function M.load_session(session, before_callback, after_callback)
if type(before_callback) == "function" then if type(before_callback) == "function" then
before_callback() before_callback()
end end
local ok, result = pcall(vim.cmd, "source " .. e(session)) local ok, result = pcall(vim.cmd, "source " .. e(session))
if not ok then if not ok then
return M.echoerr("Error loading the session! ", result) return M.echoerr("Error loading the session! ", result)
end end
if type(after_callback) == "function" then if type(after_callback) == "function" then
after_callback() after_callback()
end end