Skip to content

Commit

Permalink
fix: Focus parent before closing (#259)
Browse files Browse the repository at this point in the history
  • Loading branch information
brianreumere committed Feb 16, 2023
1 parent 556ef30 commit 66b057b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lua/trouble/view.lua
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ end
function View:close()
util.debug("close")
if vim.api.nvim_win_is_valid(self.win) then
vim.api.nvim_set_current_win(self.parent)
vim.api.nvim_win_close(self.win, {})
end
if vim.api.nvim_buf_is_valid(self.buf) then
Expand Down

0 comments on commit 66b057b

Please sign in to comment.