add TreeDirNode.getDirChildren() - using this in a plugin

This commit is contained in:
Martin Grenfell
2015-11-16 11:30:16 +00:00
parent bf217c75f9
commit 71ee64fed7

View File

@@ -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