feat: add to jumplist before goto location

This commit is contained in:
eph
2025-01-06 00:27:33 +08:00
parent 8889a10cf5
commit 14e245bbfa

View File

@@ -392,6 +392,9 @@ function Sidebar:__goto_location(change_focus)
return return
end end
-- XXX: There will be strange problems when using `nvim_buf_set_mark()`.
vim.fn.win_execute(self.code.win, "normal! m'")
vim.api.nvim_win_set_cursor(self.code.win, { node.line + 1, node.character }) vim.api.nvim_win_set_cursor(self.code.win, { node.line + 1, node.character })
if cfg.o.outline_window.center_on_jump then if cfg.o.outline_window.center_on_jump then