Skip to content

Commit

Permalink
fix(jump): save current main cursor to jump list before jumping. Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Mar 29, 2024
1 parent d0ed7af commit 7855f9c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lua/trouble/view/init.lua
Expand Up @@ -187,6 +187,11 @@ function M:jump(item, opts)
local main = self:main()
local win = main and main.win or 0

vim.api.nvim_win_call(win, function()
-- save position in jump list
vim.cmd("normal! m'")
end)

if opts.split then
vim.api.nvim_win_call(win, function()
vim.cmd("split")
Expand Down

0 comments on commit 7855f9c

Please sign in to comment.