Rework the "TreeDirNode.closeChildren()" method

This function needed polishing; in the choice of variable names and
in the leading comment.
This commit is contained in:
Jason Franklin 2017-07-14 17:36:09 -04:00
parent 3245007f0e
commit 1f089a362b

View File

@ -56,12 +56,12 @@ function! s:TreeDirNode.close()
endfunction endfunction
" FUNCTION: TreeDirNode.closeChildren() {{{1 " 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() function! s:TreeDirNode.closeChildren()
for i in self.children for l:child in self.children
if i.path.isDirectory if l:child.path.isDirectory
call i.close() call l:child.close()
call i.closeChildren() call l:child.closeChildren()
endif endif
endfor endfor
endfunction endfunction