commit 1f089a362b859f8879f70f1ccdb7e40d1e5ba822 parent 3245007f0e9c3a99040591ac8fc2a647d6ced4ee Author: Jason Franklin <j_fra@fastmail.us> Date: Fri, 14 Jul 2017 17:36:09 -0400 Rework the "TreeDirNode.closeChildren()" method This function needed polishing; in the choice of variable names and in the leading comment. Diffstat:
| M | lib/nerdtree/tree_dir_node.vim | | | 10 | +++++----- |
1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/nerdtree/tree_dir_node.vim b/lib/nerdtree/tree_dir_node.vim @@ -56,12 +56,12 @@ function! s:TreeDirNode.close() endfunction " FUNCTION: TreeDirNode.closeChildren() {{{1 -" Closes all the child dir nodes of this node +" Recursively close any directory nodes that are descendants of this node. function! s:TreeDirNode.closeChildren() - for i in self.children - if i.path.isDirectory - call i.close() - call i.closeChildren() + for l:child in self.children + if l:child.path.isDirectory + call l:child.close() + call l:child.closeChildren() endif endfor endfunction
