Skip to content

Commit

Permalink
fix: return to source window on close (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc committed Dec 13, 2022
1 parent 97279a1 commit a95b63f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lua/aerial/actions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,13 @@ M.next_up = {

M.close = {
desc = "Close the aerial window",
callback = aerial.close,
callback = function()
local source_win = require("aerial.util").get_winids(0)
if source_win then
vim.api.nvim_set_current_win(source_win)
end
aerial.close()
end,
}

M.tree_toggle = {
Expand Down

0 comments on commit a95b63f

Please sign in to comment.