summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/telescope/builtin/files.lua10
1 files changed, 3 insertions, 7 deletions
diff --git a/lua/telescope/builtin/files.lua b/lua/telescope/builtin/files.lua
index bcc4886..a54f31a 100644
--- a/lua/telescope/builtin/files.lua
+++ b/lua/telescope/builtin/files.lua
@@ -107,12 +107,6 @@ files.grep_string = function(opts)
local word_match = opts.word_match
opts.entry_maker = opts.entry_maker or make_entry.gen_from_vimgrep(opts)
- if search_dirs then
- for i, path in ipairs(search_dirs) do
- search_dirs[i] = vim.fn.expand(path)
- end
- end
-
local args = flatten {
vimgrep_arguments,
word_match,
@@ -120,7 +114,9 @@ files.grep_string = function(opts)
}
if search_dirs then
- table.insert(args, search_dirs)
+ for _, path in ipairs(search_dirs) do
+ table.insert(args, vim.fn.expand(path))
+ end
elseif os_sep == '\\' then
table.insert(args, '.')
end