fix: pickers use entry.filename as default and fallback to entry.value for file_ignore_patterns (#1243)

This commit is contained in:
TheLeoP
2021-09-19 10:38:44 -05:00
committed by GitHub
parent 37c9ab6688
commit 02bc88e6d6

View File

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