Skip to content

Commit

Permalink
fix(util): save position in jump list before jump. Fixes #143 Fixes #235
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Apr 17, 2023
1 parent 2ae7237 commit f0477b0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/trouble/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ function M.jump_to_item(win, precmd, item)
-- requiring here, as otherwise we run into a circular dependency
local View = require("trouble.view")

-- save position in jump list
vim.cmd("normal! m'")

View.switch_to(win)
if precmd then
vim.cmd(precmd)
Expand Down

0 comments on commit f0477b0

Please sign in to comment.