fix: oldfiles cwd_only that include backslashes (windows) (#820)

This commit is contained in:
Luke Kershaw
2021-05-08 12:38:40 +01:00
committed by GitHub
parent bc6385be31
commit 144c761e03

View File

@@ -251,6 +251,7 @@ internal.oldfiles = function(opts)
if opts.cwd_only then
local cwd = vim.loop.cwd()
cwd = cwd:gsub([[\]],[[\\]])
results = vim.tbl_filter(function(file)
return vim.fn.matchstrpos(file, cwd)[2] ~= -1
end, results)