尝试修复 add file 作为上下文时会找不到文件

This commit is contained in:
zhangkun9038@dingtalk.com 2025-02-16 23:38:46 +08:00
parent 183bf7d8b0
commit a6288b8357

@ -120,6 +120,8 @@ function M.get(opts)
M.cache[buf] = ret M.cache[buf] = ret
end end
if opts and opts.normalize then return ret end if opts and opts.normalize then return ret end
-- Ensure a non-empty return value
ret = ret ~= "" and ret or vim.uv.cwd()
return Utils.is_win() and ret:gsub("/", "\\") or ret return Utils.is_win() and ret:gsub("/", "\\") or ret
end end