Skip to content

Commit

Permalink
fix: clear namespace with pcall to fix lazy loading weirdness. Fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Sep 17, 2022
1 parent 7680106 commit f990cd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/todo-comments/highlight.lua
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ function M.stop()
vim.fn.sign_unplace("todo-signs")
for buf, _ in pairs(M.bufs) do
if vim.api.nvim_buf_is_valid(buf) then
vim.api.nvim_buf_clear_namespace(buf, Config.ns, 0, -1)
pcall(vim.api.nvim_buf_clear_namespace, buf, Config.ns, 0, -1)
end
end
M.bufs = {}
Expand Down

0 comments on commit f990cd9

Please sign in to comment.