Skip to content

Commit

Permalink
Merge pull request #202 from techlivezheng/feature/find-hidden-file
Browse files Browse the repository at this point in the history
Make NERDTreeFind work on hidden files
  • Loading branch information
scrooloose committed Nov 12, 2012
2 parents 22de74a + ce6c347 commit 36cd8bf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions plugin/NERD_tree.vim
Original file line number Diff line number Diff line change
Expand Up @@ -2999,6 +2999,11 @@ function! s:findAndRevealPath()
return
endtry

if p.getLastPathComponent(0) =~# '^\.'
let showhidden=g:NERDTreeShowHidden
let g:NERDTreeShowHidden = 1
endif

if !s:treeExistsForTab()
try
let cwd = s:Path.New(getcwd())
Expand All @@ -3023,6 +3028,10 @@ function! s:findAndRevealPath()
endif
call s:putCursorInTreeWin()
call b:NERDTreeRoot.reveal(p)

if p.getLastPathComponent(0) =~# '^\.'
let g:NERDTreeShowHidden = showhidden
endif
endfunction

" FUNCTION: s:has_opt(options, name) {{{2
Expand Down

0 comments on commit 36cd8bf

Please sign in to comment.