mirror of
https://github.com/hexedtech/codemp-nvim.git
synced 2024-11-21 23:14:54 +01:00
fix: print error as err
This commit is contained in:
parent
51d6628fd4
commit
bf59d71e3b
1 changed files with 4 additions and 4 deletions
|
@ -45,11 +45,11 @@ if CODEMP == nil then
|
|||
CODEMP.timer = vim.loop.new_timer()
|
||||
CODEMP.timer:start(CODEMP.config.timer_interval, CODEMP.config.timer_interval, function()
|
||||
while true do
|
||||
local success, cb, arg = pcall(CODEMP.native.poll_callback)
|
||||
if not success then
|
||||
print(vim.inspect(cb))
|
||||
local cb, arg = CODEMP.native.poll_callback()
|
||||
if cb == nil then break end
|
||||
if cb == false then
|
||||
error(arg)
|
||||
else
|
||||
if cb == nil then break end
|
||||
vim.schedule(function() cb(arg) end)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue