Skip to content

Commit 0523fe3

Browse files
authored
fix(core.lua): Defer vim.notify call in libuv eventloop using vim.sch… (#170)
* fix(core.lua): Defer vim.notify call in libuv eventloop using vim.schedule * fixed formatting
1 parent 6b01f95 commit 0523fe3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lua/fff/core.lua

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,13 @@ local function setup_global_autocmds(config)
2828

2929
vim.uv.fs_realpath(file_path, function(rp_err, real_path)
3030
if rp_err or not real_path then return end
31-
pcall(fuzzy.track_access, real_path)
31+
local ok, track_err = pcall(fuzzy.track_access, real_path)
32+
33+
if not ok then
34+
vim.schedule(
35+
function() vim.notify('FFF: Failed to track file access: ' .. tostring(track_err), vim.log.levels.ERROR) end
36+
)
37+
end
3238
end)
3339
end)
3440
end,

0 commit comments

Comments
 (0)