manually apply #220 to fix NERDTreeFind for hidden dirs

This commit is contained in:
Martin Grenfell 2013-01-05 01:48:13 +00:00
parent 370f180ca0
commit 8a984260e7
2 changed files with 17 additions and 1 deletions

View File

@ -179,7 +179,7 @@ function! nerdtree#findAndRevealPath()
return return
endtry endtry
if p.isUnixHiddenFile() if p.isUnixHiddenPath()
let showhidden=g:NERDTreeShowHidden let showhidden=g:NERDTreeShowHidden
let g:NERDTreeShowHidden = 1 let g:NERDTreeShowHidden = 1
endif endif

View File

@ -327,6 +327,21 @@ function! s:Path.isUnixHiddenFile()
return self.getLastPathComponent(0) =~# '^\.' return self.getLastPathComponent(0) =~# '^\.'
endfunction endfunction
"FUNCTION: Path.isUnixHiddenPath() {{{3
"check for unix path with hidden components
function! s:Path.isUnixHiddenPath()
if self.getLastPathComponent(0) =~# '^\.'
return 1
else
for segment in self.pathSegments
if segment =~# '^\.'
return 1
endif
endfor
return 0
endif
endfunction
"FUNCTION: Path.ignore() {{{3 "FUNCTION: Path.ignore() {{{3
"returns true if this path should be ignored "returns true if this path should be ignored
function! s:Path.ignore() function! s:Path.ignore()
@ -693,3 +708,4 @@ function! s:Path.WinToUnixPath(pathstr)
return toReturn return toReturn
endfunction endfunction
" vim: set sw=4 sts=4 et fdm=marker: