Skip to content

Commit

Permalink
fix(view): do norm! zz zv after jump. See #408
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed May 30, 2024
1 parent 4496f9e commit 74e31e7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/trouble/view/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@ function M:jump(item, opts)
-- order of the below seems important with splitkeep=screen
vim.api.nvim_set_current_win(win)
vim.api.nvim_win_set_cursor(win, item.pos)
vim.api.nvim_win_call(win, function()
vim.cmd("norm! zz zv")
end)
return item
end

Expand Down

0 comments on commit 74e31e7

Please sign in to comment.