fix(view): dont go to main when not in the trouble window when closing

This commit is contained in:
Folke Lemaitre 2024-06-13 19:51:34 +02:00
parent 286c04474c
commit 8d5e05c0d0
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 3 additions and 1 deletions

View File

@ -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