Skip to content

Commit

Permalink
fix(popupmenu): properly close pmenu when cmdline window is open. Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jul 20, 2023
1 parent dba8ac8 commit d19e5cb
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions lua/noice/ui/popupmenu/nui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -242,14 +242,24 @@ function M.on_select(state)
end

function M.on_hide()
if M.menu then
M.menu:unmount()
M.menu = nil
end
if M.scroll then
M.scroll:unmount()
M.scroll = nil
end
Util.protect(function()
if M.menu then
M.menu:unmount()
M.menu = nil
end
if M.scroll then
M.scroll:unmount()
M.scroll = nil
end
end, {
finally = function()
if M.menu then
M.menu._.loading = false
end
end,
retry_on_E11 = true,
retry_on_E565 = true,
})()
end

return M

0 comments on commit d19e5cb

Please sign in to comment.