fix: call vimL function in main loop (#206)

This commit is contained in:
Steven Arcangeli 2023-10-28 11:02:05 -07:00
parent 4088efb8ff
commit 8418e94734

View file

@ -13,7 +13,9 @@ local FIELD_NAME = constants.FIELD_NAME
local FIELD_META = constants.FIELD_META
local function read_link_data(path, cb)
uv.fs_readlink(path, function(link_err, link)
uv.fs_readlink(
path,
vim.schedule_wrap(function(link_err, link)
if link_err then
cb(link_err)
else
@ -27,6 +29,7 @@ local function read_link_data(path, cb)
end)
end
end)
)
end
---@param path string