mirror of
https://github.com/preservim/nerdtree.git
synced 2024-11-22 10:06:16 +08:00
Refresh a dir_node if the file wasn't found in it, and look once more. (#1005)
This commit is contained in:
parent
12dea6ccb2
commit
9bedadd062
|
@ -620,6 +620,11 @@ function! s:TreeDirNode.reveal(path, ...)
|
|||
|
||||
if self.path.equals(a:path.getParent())
|
||||
let n = self.findNode(a:path)
|
||||
" We may be looking for a newly-saved file that isn't in the tree yet.
|
||||
if n == {}
|
||||
call self.refresh()
|
||||
let n = self.findNode(a:path)
|
||||
endif
|
||||
if has_key(opts, "open")
|
||||
call n.open()
|
||||
endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user