mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
feat(fold): expand fold to previous line when reopen buffer
This commit is contained in:
parent
5c1656729a
commit
6392284de8
1 changed files with 1 additions and 0 deletions
|
|
@ -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,
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue