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:
Martin Grenfell 2012-11-12 02:06:22 -08:00
commit dff80ff7d0

View File

@ -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("")