Closed Zeioth closed 1 year ago
I wonder what strategy we could follow to fix this. Or if it is fixable even. I've tried to delete the block:
for _, buffer in ipairs(vim.api.nvim_list_bufs()) do
if vim.api.nvim_buf_is_valid(buffer) and not utils.is_restorable(buffer) then
vim.api.nvim_buf_delete(buffer, { force = true })
end
end
And it is true having it fixes many unwanted scenarios (for example, restoring neotree would cause an inconsistent state on that plugin).
On the other side saving session only on VimLeave
won't save the session in some scenarios like a power loss.
Thanks! Not sure if it's possible to do something about it.
When using the
BufWritePre
event. → Feel free to ignore or edit this commit.