Make NERDTreeFind use an existing NERDTree window

This commit is contained in:
Techlive Zheng 2012-11-05 01:21:53 +08:00
parent ce6c347f85
commit c59ac8fba1

View File

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