summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorTheLeoP <53507599+TheLeoP@users.noreply.github.com>2021-09-19 10:38:44 -0500
committerGitHub <noreply@github.com>2021-09-19 17:38:44 +0200
commit02bc88e6d61bd10272277796ca8ea3ad96a388dd (patch)
treedfb96936dabce22f6ed8ae10c6684a3bb41199a6 /lua
parent37c9ab6688eb2cf46a22c70c8d46ca9d4e147e85 (diff)
fix: pickers use entry.filename as default and fallback to entry.value for file_ignore_patterns (#1243)
Diffstat (limited to 'lua')
-rw-r--r--lua/telescope/pickers.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/telescope/pickers.lua b/lua/telescope/pickers.lua
index 624ab00..09a062f 100644
--- a/lua/telescope/pickers.lua
+++ b/lua/telescope/pickers.lua
@@ -1049,7 +1049,7 @@ function Picker:get_result_processor(find_id, prompt, status_updater)
-- a ton of time on large results.
log.trace("Processing result... ", entry)
for _, v in ipairs(self.file_ignore_patterns or {}) do
- local file = type(entry.value) == "string" and entry.value or entry.filename
+ local file = vim.F.if_nil(entry.filename, type(entry.value) == "string" and entry.value) -- false if none is true
if file then
if string.find(file, v) then
log.trace("SKIPPING", entry.value, "because", v)