Add option to disable collapsing of diretory names

This commit is contained in:
Juan Ibiapina
2016-03-05 14:20:04 -03:00
parent 88946e9832
commit b2bbed41fa
3 changed files with 24 additions and 4 deletions

View File

@@ -250,6 +250,10 @@ endfunction
"FUNCTION: TreeDirNode.isCascadable() {{{1
"true if this dir has only one visible child - which is also a dir
function! s:TreeDirNode.isCascadable()
if g:NERDTreeCascadeSingleChildDir == 0
return 0
endif
let c = self.getVisibleChildren()
return len(c) == 1 && c[0].path.isDirectory
endfunction