Skip to content

Commit

Permalink
fix(bar): invalid buffer number after :bw <buffer>
Browse files Browse the repository at this point in the history
  • Loading branch information
bekaboo committed Jun 25, 2023
1 parent 10daa88 commit 2cc0381
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lua/dropbar/bar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,12 @@ function dropbar_t:update()
local request_time = vim.uv.hrtime() / 1e6
self.last_update_request_time = request_time
vim.defer_fn(function()
if not self.win or not vim.api.nvim_win_is_valid(self.win) then
if
not self.win
or not self.buf
or not vim.api.nvim_win_is_valid(self.win)
or not vim.api.nvim_buf_is_valid(self.buf)
then
self:del()
return
end
Expand Down

0 comments on commit 2cc0381

Please sign in to comment.