Edit the filter in the TreeDirNode glob method
A better style for executing the removal of each filtered name was chosen. This is a minor change, but I viewed it as necessary.
This commit is contained in:
parent
2a97fb0fda
commit
779e13374a
@ -256,7 +256,6 @@ function! s:TreeDirNode._glob(pattern, all)
|
||||
|
||||
" If "a:all" is false, filter "." and ".." from the output.
|
||||
if !a:all
|
||||
|
||||
let l:toRemove = []
|
||||
|
||||
for l:file in l:globList
|
||||
@ -275,10 +274,9 @@ function! s:TreeDirNode._glob(pattern, all)
|
||||
endif
|
||||
endfor
|
||||
|
||||
if !empty(l:toRemove)
|
||||
call remove(l:globList, index(l:globList, l:toRemove[0]))
|
||||
call remove(l:globList, index(l:globList, l:toRemove[1]))
|
||||
endif
|
||||
for l:file in l:toRemove
|
||||
call remove(l:globList, index(l:globList, l:file))
|
||||
endfor
|
||||
endif
|
||||
|
||||
return l:globList
|
||||
|
Loading…
x
Reference in New Issue
Block a user