fix(oldfiles): use path separator from builtin utils in cwd_only (#2340)

(cherry picked from commit 83eb2f9756)
This commit is contained in:
Hasan Mahmud
2023-01-22 14:18:34 +06:00
committed by Simon Hauser
parent 5182e1dd52
commit ebdea0a718
+1 -1
View File
@@ -517,7 +517,7 @@ internal.oldfiles = function(opts)
end
if opts.cwd_only then
local cwd = vim.loop.cwd() .. "/"
local cwd = vim.loop.cwd() .. utils.get_separator()
cwd = cwd:gsub([[\]], [[\\]])
results = vim.tbl_filter(function(file)
return vim.fn.matchstrpos(file, cwd)[2] ~= -1