Remove the helper function for "openRecursively()"
The support function for this method was unnecessary, so I took the time to remove it. Since "TreeDirNode.openRecursively()" now calls the "open()" method, it can take advantage of the improvements made to that function in recent commits. Specifically, this method will reflect the bugfix provided in pull request #720.
This commit is contained in:
parent
7f4a7205dc
commit
ef35ee8918
@ -492,35 +492,16 @@ function! s:TreeDirNode._openInNewTab()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" FUNCTION: TreeDirNode.openRecursively() {{{1
|
" FUNCTION: TreeDirNode.openRecursively() {{{1
|
||||||
" Opens this treenode and all of its children whose paths arent 'ignored'
|
" Open this directory node and any descendant directory nodes whose pathnames
|
||||||
" because of the file filters.
|
" are not ignored.
|
||||||
"
|
|
||||||
" This method is actually a wrapper for the OpenRecursively2 method which does
|
|
||||||
" the work.
|
|
||||||
function! s:TreeDirNode.openRecursively()
|
function! s:TreeDirNode.openRecursively()
|
||||||
call self._openRecursively2(1)
|
silent call self.open()
|
||||||
endfunction
|
|
||||||
|
|
||||||
" FUNCTION: TreeDirNode._openRecursively2() {{{1
|
for l:child in self.children
|
||||||
" Opens this all children of this treenode recursively if either:
|
if l:child.path.isDirectory && !l:child.path.ignore(l:child.getNerdtree())
|
||||||
" *they arent filtered by file filters
|
call l:child.openRecursively()
|
||||||
" *a:forceOpen is 1
|
|
||||||
"
|
|
||||||
" Args:
|
|
||||||
" forceOpen: 1 if this node should be opened regardless of file filters
|
|
||||||
function! s:TreeDirNode._openRecursively2(forceOpen)
|
|
||||||
if self.path.ignore(self.getNerdtree()) ==# 0 || a:forceOpen
|
|
||||||
let self.isOpen = 1
|
|
||||||
if self.children ==# []
|
|
||||||
call self._initChildren(1)
|
|
||||||
endif
|
|
||||||
|
|
||||||
for i in self.children
|
|
||||||
if i.path.isDirectory ==# 1
|
|
||||||
call i._openRecursively2(0)
|
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
endif
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" FUNCTION: TreeDirNode.refresh() {{{1
|
" FUNCTION: TreeDirNode.refresh() {{{1
|
||||||
|
Loading…
Reference in New Issue
Block a user