commit 779e13374a29b736d25f255c281383862637f5ac
parent 2a97fb0fdaac05096a92d3dba35a05f5694298f6
Author: Jason Franklin <j_fra@fastmail.us>
Date: Tue, 27 Jun 2017 11:10:52 -0400
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.
Diffstat:
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/lib/nerdtree/tree_dir_node.vim b/lib/nerdtree/tree_dir_node.vim
@@ -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