Skip to content

Commit

Permalink
Merge pull request #8 from QuentinGruber/fix-nvim-echo-bug
Browse files Browse the repository at this point in the history
Fix bug: nvim_echo must not be called in a lua loop callback
  • Loading branch information
QuentinGruber authored Sep 27, 2024
2 parents a9a8eaf + 6a2d51a commit 21c3b6c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lua/pomodoro/log.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ local log = {}
local p = "[pomodoro.nvim] "

function log.info(txt)
vim.notify(p .. txt)
vim.schedule(function()
vim.notify(p .. txt)
end)
end

function log.error(txt)
vim.notify(p .. txt)
vim.schedule(function()
vim.notify(p .. txt)
end)
end

return log

0 comments on commit 21c3b6c

Please sign in to comment.