mirror of
https://github.com/preservim/nerdtree.git
synced 2024-11-23 12:47:59 +08:00
Merge pull request #203 from techlivezheng/feature/find-in-existing-window
Reveal the current editing file in current NERDTree window instaead initiating a new one
This commit is contained in:
commit
dff80ff7d0
|
@ -3026,7 +3026,13 @@ function! s:findAndRevealPath()
|
|||
endif
|
||||
else
|
||||
if !p.isUnder(s:TreeFileNode.GetRootForTab().path)
|
||||
call s:initNerdTree(p.getParent().str())
|
||||
if !s:isTreeOpen()
|
||||
call s:createTreeWin()
|
||||
else
|
||||
call s:putCursorInTreeWin()
|
||||
endif
|
||||
let b:NERDTreeShowHidden = g:NERDTreeShowHidden
|
||||
call s:chRoot(s:TreeDirNode.New(p.getParent()))
|
||||
else
|
||||
if !s:isTreeOpen()
|
||||
call s:toggle("")
|
||||
|
|
Loading…
Reference in New Issue
Block a user