summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorSlotos <slotos@gmail.com>2022-03-10 15:17:15 +0200
committerGitHub <noreply@github.com>2022-03-10 14:17:15 +0100
commit2032f4316f563119f922bde7a337307928abb46a (patch)
tree0e3cb903b96b6216e4b90bc72f3ff46b4cde3e59 /lua
parent234066f875c131b92e99f92495729a8f6f5c1bb9 (diff)
fix(*grep): escape dot when not using regex (#1784)
Diffstat (limited to 'lua')
-rw-r--r--lua/telescope/builtin/files.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/lua/telescope/builtin/files.lua b/lua/telescope/builtin/files.lua
index 2a5dd22..db3db9b 100644
--- a/lua/telescope/builtin/files.lua
+++ b/lua/telescope/builtin/files.lua
@@ -17,7 +17,7 @@ local filter = vim.tbl_filter
local files = {}
local escape_chars = function(string)
- return string.gsub(string, "[%(|%)|\\|%[|%]|%-|%{%}|%?|%+|%*|%^|%$]", {
+ return string.gsub(string, "[%(|%)|\\|%[|%]|%-|%{%}|%?|%+|%*|%^|%$|%.]", {
["\\"] = "\\\\",
["-"] = "\\-",
["("] = "\\(",
@@ -31,6 +31,7 @@ local escape_chars = function(string)
["*"] = "\\*",
["^"] = "\\^",
["$"] = "\\$",
+ ["."] = "\\.",
})
end