Skip to content

Commit

Permalink
schedule log changes to avoid textlock
Browse files Browse the repository at this point in the history
luxluth committed Jan 24, 2025
1 parent ad3b11b commit c9a1dc7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/oz/engine.lua
Original file line number Diff line number Diff line change
@@ -40,7 +40,9 @@ function EC:spinsup_compiler(port)
if read_err then
vim.notify("ozengine server read error\n[CAUSE] " .. read_err, vim.log.levels.ERROR, { title = "oz.nvim" })
elseif chunk then
LogBuf:push(vim.split(chunk, "\n", { trimempty = true }))
vim.schedule(function()
LogBuf:push(vim.split(chunk, "\n", { trimempty = true }))
end)
else
vim.notify("The ozengine server has disconnected", vim.log.levels.WARN, { title = "oz.nvim" })
uv.close(client, function()

0 comments on commit c9a1dc7

Please sign in to comment.