Skip to content

Commit 945a23a

Browse files
committed
Fix nvim_echo with vim.schedule
1 parent 1b3a0af commit 945a23a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lua/commons/log.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ local function log(level, msg)
7171
LogHighlights[level],
7272
})
7373
end
74-
vim.api.nvim_echo(msg_chunks, false, {})
74+
vim.schedule(function()
75+
vim.api.nvim_echo(msg_chunks, false, {})
76+
end)
7577
end
7678
if LogConfigs.use_file then
7779
local fp = io.open(LogConfigs.file_name, "a")

0 commit comments

Comments
 (0)