mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-08 11:23:48 -05:00
Refresh a dir_node if the file wasn't found in it, and look once more. (#1005)
This commit is contained in:
@@ -620,6 +620,11 @@ function! s:TreeDirNode.reveal(path, ...)
|
|||||||
|
|
||||||
if self.path.equals(a:path.getParent())
|
if self.path.equals(a:path.getParent())
|
||||||
let n = self.findNode(a:path)
|
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")
|
if has_key(opts, "open")
|
||||||
call n.open()
|
call n.open()
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user