mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-08 11:23:48 -05: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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user