diff --git a/lib/nerdtree/tree_dir_node.vim b/lib/nerdtree/tree_dir_node.vim index a834e7c..aa9dea6 100644 --- a/lib/nerdtree/tree_dir_node.vim +++ b/lib/nerdtree/tree_dir_node.vim @@ -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