fix(win): dont error when augroup is already deleted

This commit is contained in:
Folke Lemaitre 2024-11-05 13:28:17 +01:00
parent 7a7f221020
commit 8c43597f10
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -159,7 +159,7 @@ function M:close(opts)
vim.api.nvim_buf_delete(buf, { force = true })
end
if self.augroup then
vim.api.nvim_del_augroup_by_id(self.augroup)
pcall(vim.api.nvim_del_augroup_by_id, self.augroup)
self.augroup = nil
end
end)