Skip to content

Commit

Permalink
fix(menu): error if execute :bw in dropbar menu
Browse files Browse the repository at this point in the history
  • Loading branch information
bekaboo committed Jul 6, 2023
1 parent e07ef94 commit 62590d6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/dropbar/menu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ function dropbar_menu_t:del()
end
self:close()
if self.buf then
vim.api.nvim_buf_delete(self.buf, {})
if vim.api.nvim_buf_is_valid(self.buf) then
vim.api.nvim_buf_delete(self.buf, {})
end
self.buf = nil
end
if self.win then
Expand Down

0 comments on commit 62590d6

Please sign in to comment.