mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +00:00
feat(lsp,diagnostic): open folds in jump-related functions (#16784)
(cherry picked from commit ddf545c152
)
Co-authored-by: Dmytro Meleshko <dmytro.meleshko@gmail.com>
This commit is contained in:
![41898282+github-actions[bot]@users.noreply.github.com](/assets/img/avatar_default.png)
committed by
GitHub

parent
7b60ec79ea
commit
ee9e3420fd
@@ -998,6 +998,8 @@ function M.jump_to_location(location)
|
||||
local row = range.start.line
|
||||
local col = get_line_byte_from_position(0, range.start)
|
||||
api.nvim_win_set_cursor(0, {row + 1, col})
|
||||
-- Open folds under the cursor
|
||||
vim.cmd("normal! zv")
|
||||
return true
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user