Skip to content

Commit

Permalink
fix(nui): set mounted=false if buffer is no longer valid
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jan 16, 2023
1 parent 6ff586f commit 3353a7a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lua/noice/view/nui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,10 @@ function NuiView:is_mounted()
self._nui.winid = nil
end

if self._nui and self._nui._.mounted and not self._nui.bufnr then
self._nui._.mounted = false
end

return self._nui and self._nui._.mounted and self._nui.bufnr
end

Expand Down

0 comments on commit 3353a7a

Please sign in to comment.