Skip to content

Commit

Permalink
fix: reopen scrollbar windows if they were deleted somehow. Fixes #235
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Nov 20, 2022
1 parent 0115097 commit 74c7e29
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lua/noice/view/scrollbar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ function Scrollbar:update()
self:show()
end

if not (vim.api.nvim_win_is_valid(self.bar.winnr) and vim.api.nvim_win_is_valid(self.thumb.winnr)) then
self:hide()
self:show()
end

local zindex = vim.api.nvim_win_get_config(self.winnr).zindex or 50

Util.win_apply_config(self.bar.winnr, {
Expand Down

0 comments on commit 74c7e29

Please sign in to comment.