Skip to content

Commit a14c9f1

Browse files
committed
fix(vectorcode): wrap logging in vim.schedule to prevent fast event context errors
inspire by: coder/claudecode.nvim#54 Signed-off-by: tzssangglass <[email protected]>
1 parent 9352fd2 commit a14c9f1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lua/codecompanion/_extensions/history/vectorcode.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ M.vectorise = check_vectorcode_wrap(function(path)
5858
end
5959
vim.system({ M.opts.vectorcode_exe, "vectorise", "--project_root", summary_dir, "--pipe", path }, {}, function(out)
6060
if M.opts.notify then
61-
vim.notify("Indexing finished!", vim.log.levels.INFO, { title = "CodeCompanion-History" })
61+
vim.schedule(function()
62+
vim.notify("Indexing finished!", vim.log.levels.INFO, { title = "CodeCompanion-History" })
63+
end)
6264
end
6365
local ok, _ = pcall(vim.json.decode, out.stdout)
6466
if not ok and out.stderr then

0 commit comments

Comments
 (0)