mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-08 11:23:48 -05:00
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:
@@ -5,6 +5,7 @@
|
|||||||
- **.PATCH**: Pull Request Title (PR Author) [PR Number](Link to PR)
|
- **.PATCH**: Pull Request Title (PR Author) [PR Number](Link to PR)
|
||||||
-->
|
-->
|
||||||
#### 6.7
|
#### 6.7
|
||||||
|
- **.10**: Do not consider the tree root to be "cascadable". (lifecrisis) [#1120](https://github.com/preservim/nerdtree/pull/1120)
|
||||||
- **.9**: Force `:NERDTreeFocus` to allow events to be fired when switching windows. (PhilRunninger) [#1118](https://github.com/preservim/nerdtree/pull/1118)
|
- **.9**: Force `:NERDTreeFocus` to allow events to be fired when switching windows. (PhilRunninger) [#1118](https://github.com/preservim/nerdtree/pull/1118)
|
||||||
- **.8**: Fix example code for the `NERDTreeAddKeyMap()` function. (PhilRunninger) [#1116](https://github.com/preservim/nerdtree/pull/1116)
|
- **.8**: Fix example code for the `NERDTreeAddKeyMap()` function. (PhilRunninger) [#1116](https://github.com/preservim/nerdtree/pull/1116)
|
||||||
- **.7**: Put `'%'` argument in `bufname()` for backwards compatibility. (PhilRunninger) [#1105](https://github.com/preservim/nerdtree/pull/1105)
|
- **.7**: Put `'%'` argument in `bufname()` for backwards compatibility. (PhilRunninger) [#1105](https://github.com/preservim/nerdtree/pull/1105)
|
||||||
|
|||||||
@@ -377,11 +377,17 @@ endfunction
|
|||||||
" 1. If cascaded, we don't know which dir is bookmarked or is a symlink.
|
" 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
|
" 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.
|
" 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()
|
function! s:TreeDirNode.isCascadable()
|
||||||
if g:NERDTreeCascadeSingleChildDir ==# 0
|
if g:NERDTreeCascadeSingleChildDir ==# 0
|
||||||
return 0
|
return 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if self.isRoot()
|
||||||
|
return 0
|
||||||
|
endif
|
||||||
|
|
||||||
if self.path.isSymLink
|
if self.path.isSymLink
|
||||||
return 0
|
return 0
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user