File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -294,7 +294,7 @@ function! s:GetSearchFilesByFilterForDirectory(input)
294294 return list
295295endfunction
296296
297- function ! s: GetSearchFilesByFilterForFullpath (input )
297+ function ! s: GetSearchFilesByFilterForAll (input , include_dir = 0 )
298298 let filter_origin = a: input
299299 let list = []
300300 " Match file
@@ -315,6 +315,10 @@ function! s:GetSearchFilesByFilterForFullpath(input)
315315 let list += list_extra
316316 endif
317317
318+ if ! a: include_dir
319+ return list
320+ endif
321+
318322 " Match path and file if list is short
319323 if len (list ) < s: GetMaxHeight ()
320324 let list_extra = filter (copy (s: initial_list ), {_, val - > val.path .val.file = ~ filter_origin})
@@ -334,8 +338,8 @@ function! s:GetSearchFilesByFilter(input)
334338 " Match directory only
335339 return s: GetSearchFilesByFilterForDirectory (a: input )
336340 else
337- " Match both directory and filename
338- return s: GetSearchFilesByFilterForFullpath (a: input )
341+ " Match filename, directory excluded by default for performance
342+ return s: GetSearchFilesByFilterForAll (a: input )
339343 endif
340344endfunction
341345
You can’t perform that action at this time.
0 commit comments