mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +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
|
if #self.queue == 0 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
self:update()
|
local ok, err = pcall(function()
|
||||||
self:layout()
|
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)
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue