fix(*grep): escape dot when not using regex (#1784)

This commit is contained in:
Slotos
2022-03-10 15:17:15 +02:00
committed by GitHub
parent 234066f875
commit 2032f4316f

View File

@@ -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