#1099 search obeys active ignore filters

This commit is contained in:
Alexander Courtis
2022-03-26 12:51:18 +11:00
parent 1352cb312c
commit 54c7cdbabb

View File

@@ -2,6 +2,7 @@ local api = vim.api
local uv = vim.loop
local utils = require "nvim-tree.utils"
local core = require "nvim-tree.core"
local filters = require "nvim-tree.explorer.filters"
local find_file = require("nvim-tree.actions.find-file").fn
local M = {}
@@ -27,15 +28,17 @@ local function search(dir, input_path)
break
end
if string.find(path, "/" .. input_path .. "$") then
return path
end
if stat.type == "directory" then
path = search(path, input_path)
if path then
if not filters.should_ignore(path) then
if string.find(path, "/" .. input_path .. "$") then
return path
end
if stat.type == "directory" then
path = search(path, input_path)
if path then
return path
end
end
end
name, _ = uv.fs_scandir_next(handle)