Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 18, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/nerdtree/tree_dir_node.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down