Skip to content

Commit

Permalink
Merge pull request #114 from epheien/feat-jumplist
Browse files Browse the repository at this point in the history
feat: add to jumplist before goto location
  • Loading branch information
hedyhli authored Jan 7, 2025
2 parents 8889a10 + 14e245b commit 454aedc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/outline/sidebar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,9 @@ function Sidebar:__goto_location(change_focus)
return
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 })

if cfg.o.outline_window.center_on_jump then
Expand Down

0 comments on commit 454aedc

Please sign in to comment.