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())
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user