mirror of
https://github.com/preservim/nerdtree.git
synced 2024-10-18 13:50:21 +03:00
manually apply #220 to fix NERDTreeFind for hidden dirs
This commit is contained in:
parent
370f180ca0
commit
8a984260e7
@ -179,7 +179,7 @@ function! nerdtree#findAndRevealPath()
|
||||
return
|
||||
endtry
|
||||
|
||||
if p.isUnixHiddenFile()
|
||||
if p.isUnixHiddenPath()
|
||||
let showhidden=g:NERDTreeShowHidden
|
||||
let g:NERDTreeShowHidden = 1
|
||||
endif
|
||||
|
@ -327,6 +327,21 @@ function! s:Path.isUnixHiddenFile()
|
||||
return self.getLastPathComponent(0) =~# '^\.'
|
||||
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
|
||||
"returns true if this path should be ignored
|
||||
function! s:Path.ignore()
|
||||
@ -693,3 +708,4 @@ function! s:Path.WinToUnixPath(pathstr)
|
||||
return toReturn
|
||||
endfunction
|
||||
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
Loading…
Reference in New Issue
Block a user