Skip to content

Commit 0d49755

Browse files
authored
fix: don't schedule message if not in fast event (#219)
It's harmless The motivation is to `:silent!` the log print when writing some snippets
1 parent 8416a0c commit 0d49755

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lua/leetcode/logger/init.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ function logger.log(msg, lvl)
2929
msg = debug.traceback(msg .. "\n")
3030
end
3131

32+
if not vim.in_fast_event() then
33+
vim.notify(msg, lvl, { title = title })
34+
return
35+
end
3236
vim.schedule(function()
3337
vim.notify(msg, lvl, { title = title })
3438
end)

0 commit comments

Comments
 (0)