summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Hauser <Simon-Hauser@outlook.de>2023-01-06 13:23:39 +0100
committerGitHub <noreply@github.com>2023-01-06 13:23:39 +0100
commit18fc02b499b368287e3aa267ec0b0d22afc0f19b (patch)
treebb589e28273ce145abfb4df906e9f290378cdc75
parentb24fdfdb253db3c9e563b372bbdfdb9cd2c6adc8 (diff)
fix: live_grep additional_args parsing (#2306)
-rw-r--r--lua/telescope/builtin/__files.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/lua/telescope/builtin/__files.lua b/lua/telescope/builtin/__files.lua
index 6ccd778..0021379 100644
--- a/lua/telescope/builtin/__files.lua
+++ b/lua/telescope/builtin/__files.lua
@@ -71,13 +71,16 @@ local opts_contain_invert = function(args)
end
if #v >= 2 and v:sub(1, 1) == "-" and v:sub(2, 2) ~= "-" then
+ local non_option = false
for i = 2, #v do
local vi = v:sub(i, i)
if vi == "=" then -- ignore option -g=xxx
break
- elseif vi == "v" then
+ elseif vi == "g" or vi == "f" or vi == "m" or vi == "e" or vi == "r" or vi == "t" or vi == "T" then
+ non_option = true
+ elseif non_option == false and vi == "v" then
invert = true
- elseif vi == "l" then
+ elseif non_option == false and vi == "l" then
files_with_matches = true
end
end