fix(oldfiles): use path separator from builtin utils in cwd_only (#2340)
This commit is contained in:
@@ -524,7 +524,7 @@ internal.oldfiles = function(opts)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if opts.cwd_only then
|
if opts.cwd_only then
|
||||||
local cwd = vim.loop.cwd() .. "/"
|
local cwd = vim.loop.cwd() .. utils.get_separator()
|
||||||
cwd = cwd:gsub([[\]], [[\\]])
|
cwd = cwd:gsub([[\]], [[\\]])
|
||||||
results = vim.tbl_filter(function(file)
|
results = vim.tbl_filter(function(file)
|
||||||
return vim.fn.matchstrpos(file, cwd)[2] ~= -1
|
return vim.fn.matchstrpos(file, cwd)[2] ~= -1
|
||||||
|
|||||||
Reference in New Issue
Block a user