Skip to content

Commit

Permalink
Restore getDirChildren for use in nerdtree-project-plugin. (#929)
Browse files Browse the repository at this point in the history
This function was added to support a separate plugin:
https://github.com/scrooloose/nerdtree-project-plugin.git. It was
subsequently removed without recognizing its contribution to the
external plugin. This commit restores that function so NERDTree projects
will work.
  • Loading branch information
PhilRunninger committed Dec 12, 2018
1 parent c1876da commit a4dd4e1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/nerdtree/tree_dir_node.vim
Expand Up @@ -254,6 +254,13 @@ function! s:TreeDirNode.getChildIndex(path)
return -1
endfunction

" FUNCTION: TreeDirNode.getDirChildren() {{{1
" Return a list of all child nodes from "self.children" that are of type
" TreeDirNode. This function supports http://github.com/scrooloose/nerdtree-project-plugin.git.
function! s:TreeDirNode.getDirChildren()
return filter(copy(self.children), 'v:val.path.isDirectory == 1')
endfunction

" FUNCTION: TreeDirNode._glob(pattern, all) {{{1
" Return a list of strings naming the descendants of the directory in this
" TreeDirNode object that match the specified glob pattern.
Expand Down

0 comments on commit a4dd4e1

Please sign in to comment.