Make NERDTreeFind work on hidden files

This commit is contained in:
Techlive Zheng 2012-11-05 01:19:44 +08:00
parent 22de74a45b
commit ce6c347f85

View File

@ -2999,6 +2999,11 @@ function! s:findAndRevealPath()
return return
endtry endtry
if p.getLastPathComponent(0) =~# '^\.'
let showhidden=g:NERDTreeShowHidden
let g:NERDTreeShowHidden = 1
endif
if !s:treeExistsForTab() if !s:treeExistsForTab()
try try
let cwd = s:Path.New(getcwd()) let cwd = s:Path.New(getcwd())
@ -3023,6 +3028,10 @@ function! s:findAndRevealPath()
endif endif
call s:putCursorInTreeWin() call s:putCursorInTreeWin()
call b:NERDTreeRoot.reveal(p) call b:NERDTreeRoot.reveal(p)
if p.getLastPathComponent(0) =~# '^\.'
let g:NERDTreeShowHidden = showhidden
endif
endfunction endfunction
" FUNCTION: s:has_opt(options, name) {{{2 " FUNCTION: s:has_opt(options, name) {{{2