mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-08 11:23:48 -05:00
add TreeDirNode.getDirChildren() - using this in a plugin
This commit is contained in:
@@ -171,6 +171,12 @@ function! s:TreeDirNode.getChildIndex(path)
|
||||
return -1
|
||||
endfunction
|
||||
|
||||
"FUNCTION: TreeDirNode.getDirChildren() {{{1
|
||||
"Get all children that are directories
|
||||
function! s:TreeDirNode.getDirChildren()
|
||||
return filter(self.children, 'v:val.path.isDirectory == 1')
|
||||
endfunction
|
||||
|
||||
"FUNCTION: TreeDirNode.GetSelected() {{{1
|
||||
"Returns the current node if it is a dir node, or else returns the current
|
||||
"nodes parent
|
||||
|
||||
Reference in New Issue
Block a user