From 1f089a362b859f8879f70f1ccdb7e40d1e5ba822 Mon Sep 17 00:00:00 2001 From: Jason Franklin Date: Fri, 14 Jul 2017 17:36:09 -0400 Subject: [PATCH] Rework the "TreeDirNode.closeChildren()" method This function needed polishing; in the choice of variable names and in the leading comment. --- 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 index 88ea9e6..4a6d213 100644 --- 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