Bryan 2024-11-08 01:27:29 -06:00
parent bc966308ee
commit c499fcebb4
1 changed files with 3 additions and 2 deletions

View File

@ -36,8 +36,9 @@ function M.load_session(session)
callback = function() callback = function()
vim.print("delete and load") vim.print("delete and load")
for _, buf in ipairs(vim.api.nvim_list_bufs()) do for _, buf in ipairs(vim.api.nvim_list_bufs()) do
print("buff delete") if vim.api.nvim_buf_is_loaded(buf) then
vim.api.nvim_buf_delete(buf, { force = true }) vim.api.nvim_buf_delete(buf, {})
end
end end
persisted.load({ session = session.file_path }) persisted.load({ session = session.file_path })
return true return true