mirror of
https://github.com/folke/persistence.nvim.git
synced 2025-07-13 19:04:41 +02:00
feat: persistence.active. Check if a session saving is active
This commit is contained in:
parent
06e8ef93c8
commit
f0ac0e981e
1 changed files with 5 additions and 0 deletions
|
@ -24,6 +24,11 @@ function M.fire(event)
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Check if a session is active
|
||||||
|
function M.active()
|
||||||
|
return M._current ~= nil
|
||||||
|
end
|
||||||
|
|
||||||
function M.start()
|
function M.start()
|
||||||
M._current = M.current()
|
M._current = M.current()
|
||||||
vim.api.nvim_create_autocmd("VimLeavePre", {
|
vim.api.nvim_create_autocmd("VimLeavePre", {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue