Do not consider the tree root to be "cascadable" (#1120)

* Do not consider the tree root to be "cascadable"

* Update "CHANGELOG.md"
This commit is contained in:
lifecrisis
2020-05-06 23:24:01 -04:00
committed by GitHub
parent 30ad6da984
commit 4cc6097ecb
2 changed files with 7 additions and 0 deletions

View File

@@ -377,11 +377,17 @@ endfunction
" 1. If cascaded, we don't know which dir is bookmarked or is a symlink.
" 2. If the parent is a symlink or is bookmarked, you end up with unparsable
" text, and NERDTree cannot get the path of any child node.
" Also, return false if this directory is the tree root, which should never be
" part of a cascade.
function! s:TreeDirNode.isCascadable()
if g:NERDTreeCascadeSingleChildDir ==# 0
return 0
endif
if self.isRoot()
return 0
endif
if self.path.isSymLink
return 0
endif