Skip to content

Commit 852b300

Browse files
committed
fix(handlers): schedule renderer. Fixes #153
1 parent f6f9218 commit 852b300

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lua/tiny-inline-diagnostic/handlers.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ end
1616
function M.build_throttled_renderer(opts, renderer)
1717
local throttled_fn, timer = utils.throttle(function(bufnr)
1818
if vim.api.nvim_buf_is_valid(bufnr) then
19-
renderer.render(opts, bufnr)
19+
vim.schedule(function()
20+
renderer.render(opts, bufnr)
21+
end)
2022
end
2123
end, opts.options.throttle)
2224

0 commit comments

Comments
 (0)