mirror of
https://github.com/folke/persistence.nvim.git
synced 2025-07-16 20:34:44 +02:00
fix: dont show errors when loading a session
This commit is contained in:
parent
251e89523d
commit
ad7fcd4fed
1 changed files with 2 additions and 2 deletions
|
@ -7,7 +7,7 @@ local e = vim.fn.fnameescape
|
|||
function M.get_current()
|
||||
local pattern = "/"
|
||||
if vim.fn.has("win32") == 1 then
|
||||
pattern = '[\\:]'
|
||||
pattern = "[\\:]"
|
||||
end
|
||||
local name = vim.fn.getcwd():gsub(pattern, "%%")
|
||||
return Config.options.dir .. name .. ".vim"
|
||||
|
@ -53,7 +53,7 @@ function M.load(opt)
|
|||
opt = opt or {}
|
||||
local sfile = opt.last and M.get_last() or M.get_current()
|
||||
if sfile and vim.fn.filereadable(sfile) ~= 0 then
|
||||
vim.cmd("source " .. e(sfile))
|
||||
vim.cmd("silent! source " .. e(sfile))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue