mirror of
https://github.com/preservim/nerdtree.git
synced 2024-11-29 04:33:40 +08:00
Replace an equality test with an instance method
A proper instance method was substituted for the more brittle equality test in the "TreeDirNode.open()" method. Note that the order of the tests was reversed to account for the fact that the "isRoot()" method can only be called after the first test has passed.
This commit is contained in:
parent
ebc206e58d
commit
7f4a7205dc
|
@ -431,7 +431,7 @@ function! s:TreeDirNode.open(...)
|
|||
|
||||
" Open any ancestors of this node that render within the same cascade.
|
||||
let l:parent = self.parent
|
||||
while l:parent != b:NERDTree.root && !empty(l:parent)
|
||||
while !empty(l:parent) && !l:parent.isRoot()
|
||||
if index(l:parent.getCascade(), self) >= 0
|
||||
let l:parent.isOpen = 1
|
||||
let l:parent = l:parent.parent
|
||||
|
|
Loading…
Reference in New Issue
Block a user