Skip to content

Commit

Permalink
fix(view): dont go to main when not in the trouble window when closing
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jun 13, 2024
1 parent 286c044 commit 8d5e05c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/trouble/view/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,9 @@ function M:open()
end

function M:close()
self:goto_main()
if vim.api.nvim_get_current_win() == self.win.win then
self:goto_main()
end
Preview.close()
self.win:close()
return self
Expand Down

0 comments on commit 8d5e05c

Please sign in to comment.