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 May 30, 2024
1 parent f798cf0 commit bd8bfc8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lua/trouble/view/init.lua
Original file line number Diff line number Diff line change
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 bd8bfc8

Please sign in to comment.