mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-03 18:28:38 +00:00
fix(notifier): show notifier errors with nvim_err_writeln
This commit is contained in:
parent
9ef9e69620
commit
e8061bcda0
1 changed files with 8 additions and 2 deletions
|
@ -175,8 +175,14 @@ function M:start()
|
|||
if #self.queue == 0 then
|
||||
return
|
||||
end
|
||||
self:update()
|
||||
self:layout()
|
||||
local ok, err = pcall(function()
|
||||
self:update()
|
||||
self:layout()
|
||||
end)
|
||||
if not ok then
|
||||
vim.api.nvim_err_writeln("Snacks notifier failed. Dropping queue. Error:\n " .. err)
|
||||
self.queue = {}
|
||||
end
|
||||
end)
|
||||
)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue