feat: delete current session

Mirroring the great pull request on persistence.nvim by @edementyev
main
olimorris 2022-03-03 21:16:19 +00:00
parent 336909e742
commit 831caa7261
1 changed files with 6 additions and 0 deletions

View File

@ -71,6 +71,12 @@ function M.save()
vim.g.persisting = true
end
function M.delete()
local session = M.get_current()
if session and vim.loop.fs_stat(session) ~= 0 then
M.stop()
vim.fn.system("rm " .. e(session))
end
end
function M.load(opt)