Skip to content

Commit

Permalink
fix(old_files): opts.cwd_only includes similarly named dirs (#2308)
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanueltouzery authored Jan 7, 2023
1 parent cd67e81 commit 04af51d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/telescope/builtin/__internal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ internal.oldfiles = function(opts)
end

if opts.cwd_only then
local cwd = vim.loop.cwd()
local cwd = vim.loop.cwd() .. "/"
cwd = cwd:gsub([[\]], [[\\]])
results = vim.tbl_filter(function(file)
return vim.fn.matchstrpos(file, cwd)[2] ~= -1
Expand Down

0 comments on commit 04af51d

Please sign in to comment.