Refresh a dir_node if the file wasn't found in it, and look once more. (#1005)

This commit is contained in:
Phil Runninger 2019-06-18 10:27:00 -04:00 committed by GitHub
parent 12dea6ccb2
commit 9bedadd062
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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