From 144c761e035f37943aef7e83d59482690c26f687 Mon Sep 17 00:00:00 2001 From: Luke Kershaw <35707277+l-kershaw@users.noreply.github.com> Date: Sat, 8 May 2021 12:38:40 +0100 Subject: [PATCH] fix: oldfiles cwd_only that include backslashes (windows) (#820) --- lua/telescope/builtin/internal.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/telescope/builtin/internal.lua b/lua/telescope/builtin/internal.lua index 5164245..9e1f26c 100644 --- a/lua/telescope/builtin/internal.lua +++ b/lua/telescope/builtin/internal.lua @@ -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)