feat(fold): expand fold to previous line when reopen buffer

This commit is contained in:
Phúc Lê Khắc 2023-10-17 18:35:11 +02:00
parent 5c1656729a
commit 6392284de8

View file

@ -42,6 +42,7 @@ vim.api.nvim_create_autocmd("BufReadPost", {
local lcount = vim.api.nvim_buf_line_count(buf)
if mark[1] > 0 and mark[1] <= lcount then
pcall(vim.api.nvim_win_set_cursor, 0, mark)
vim.cmd("normal! zv")
end
end,
})