mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-09 03:43:50 -05:00
rename TreeFileNode#findOpenDirSiblingWithChildren
to TreeFileNode#findOpenDirSiblingWithVisibleChildren
This commit is contained in:
@@ -495,7 +495,7 @@ function! s:TreeFileNode.findNode(path)
|
|||||||
endif
|
endif
|
||||||
return {}
|
return {}
|
||||||
endfunction
|
endfunction
|
||||||
"FUNCTION: TreeFileNode.findOpenDirSiblingWithChildren(direction) {{{3
|
"FUNCTION: TreeFileNode.findOpenDirSiblingWithVisibleChildren(direction) {{{3
|
||||||
"
|
"
|
||||||
"Finds the next sibling for this node in the indicated direction. This sibling
|
"Finds the next sibling for this node in the indicated direction. This sibling
|
||||||
"must be a directory and may/may not have children as specified.
|
"must be a directory and may/may not have children as specified.
|
||||||
@@ -505,7 +505,7 @@ endfunction
|
|||||||
"
|
"
|
||||||
"Return:
|
"Return:
|
||||||
"a treenode object or {} if no appropriate sibling could be found
|
"a treenode object or {} if no appropriate sibling could be found
|
||||||
function! s:TreeFileNode.findOpenDirSiblingWithChildren(direction)
|
function! s:TreeFileNode.findOpenDirSiblingWithVisibleChildren(direction)
|
||||||
"if we have no parent then we can have no siblings
|
"if we have no parent then we can have no siblings
|
||||||
if self.parent != {}
|
if self.parent != {}
|
||||||
let nextSibling = self.findSibling(a:direction)
|
let nextSibling = self.findSibling(a:direction)
|
||||||
@@ -2231,7 +2231,7 @@ function! s:jumpToChild(direction)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if targetNode.equals(currentNode)
|
if targetNode.equals(currentNode)
|
||||||
let siblingDir = currentNode.parent.findOpenDirSiblingWithChildren(a:direction)
|
let siblingDir = currentNode.parent.findOpenDirSiblingWithVisibleChildren(a:direction)
|
||||||
if siblingDir != {}
|
if siblingDir != {}
|
||||||
let indx = a:direction ? siblingDir.getVisibleChildCount()-1 : 0
|
let indx = a:direction ? siblingDir.getVisibleChildCount()-1 : 0
|
||||||
let targetNode = siblingDir.getChildByIndex(indx, 1)
|
let targetNode = siblingDir.getChildByIndex(indx, 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user