summaryrefslogtreecommitdiff
path: root/lua/telescope/from_entry.lua
diff options
context:
space:
mode:
authorTommy Nguyen <4123478+tido64@users.noreply.github.com>2023-02-19 11:21:29 +0100
committerGitHub <noreply@github.com>2023-02-19 11:21:29 +0100
commitad37745d4d009576eb6f4b9b6b644c3f91e0126b (patch)
treed1ffd7d2aed2da52a2f272e86ec948e0a705ee5e /lua/telescope/from_entry.lua
parent5ce991ad23253750d189c23e7688ca68898ea48b (diff)
fix: `reverse range in character class` error (#2345)
Diffstat (limited to 'lua/telescope/from_entry.lua')
-rw-r--r--lua/telescope/from_entry.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/telescope/from_entry.lua b/lua/telescope/from_entry.lua
index 486b57c..2c6e523 100644
--- a/lua/telescope/from_entry.lua
+++ b/lua/telescope/from_entry.lua
@@ -30,7 +30,7 @@ function from_entry.path(entry, validate, escape)
-- TODO(conni2461): we are not going to return the expanded path because
-- this would lead to cache misses in the perviewer.
-- Requires overall refactoring in previewer interface
- local expanded = vim.fn.expand(path)
+ local expanded = vim.fn.expand(vim.fn.escape(path, "?*[]"))
if (vim.fn.filereadable(expanded) + vim.fn.isdirectory(expanded)) == 0 then
return
end