Skip to content

Commit

Permalink
Fixing nested popup closing event propogation logic
Browse files Browse the repository at this point in the history
  • Loading branch information
carbon-steel committed Nov 14, 2023
1 parent a8602fb commit 1946db2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/detour/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ local function nested_popup()
group = augroup_id,
pattern = "" .. parent,
callback = function ()
teardownDetour(child)
vim.cmd.doautocmd("WinClosed "..child)
end
})
Expand Down Expand Up @@ -245,6 +244,7 @@ local function popup(bufnr)
if all_closed then
--print("tearing down")
teardownDetour(popup_id)
vim.cmd.doautocmd("WinClosed ".. popup_id)
end
end
})
Expand Down

0 comments on commit 1946db2

Please sign in to comment.