Skip to content

Commit

Permalink
fix: check if still loaded before trying to hide. Fixes #16
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Oct 4, 2022
1 parent b8b96e2 commit 9b2ca5e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lua/noice/view/nui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,14 @@ function NuiView:hide()
self._visible = false

Util.protect(function()
if not self._visible then
if self._nui and not self._visible then
self._nui:hide()
end
end, {
finally = function()
self._nui._.loading = false
if self._nui then
self._nui._.loading = false
end
end,
retry_on_E11 = true,
})()
Expand Down

0 comments on commit 9b2ca5e

Please sign in to comment.