Skip to content

Commit

Permalink
feat: improve after_draw_call to better handle errors
Browse files Browse the repository at this point in the history
  • Loading branch information
GustavoKatel committed Jun 19, 2022
1 parent dfb246d commit 16b3e00
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lua/sidebar-nvim/lib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ local function loop()
_redraw()

for _, fn in ipairs(M.State.after_draw_call_queue) do
fn()
local ret = pcall(fn)
if not ret then
utils.echo_warning("after_draw_call failed")
end
end
M.State.after_draw_call_queue = {}
end
Expand Down

0 comments on commit 16b3e00

Please sign in to comment.