Skip to content

Commit 543041b

Browse files
committed
Better check for help files in doc directory
1 parent f45c82a commit 543041b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

autoload/pathogen.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,9 @@ let s:done_bundles = {}
224224
function! pathogen#helptags() abort " {{{1
225225
let sep = pathogen#separator()
226226
for glob in pathogen#split(&rtp)
227-
for dir in split(glob(glob), "\n")
228-
if (dir.sep)[0 : strlen($VIMRUNTIME)] !=# $VIMRUNTIME.sep && filewritable(dir.sep.'doc') == 2 && !empty(filter(split(glob(dir.sep.'doc'.sep.'*'),"\n>"),'!isdirectory(v:val)')) && (!filereadable(dir.sep.'doc'.sep.'tags') || filewritable(dir.sep.'doc'.sep.'tags'))
229-
silent! execute 'helptags' pathogen#fnameescape(dir.'/doc')
227+
for dir in map(split(glob(glob), "\n"), 'v:val.sep."/doc/".sep')
228+
if (dir)[0 : strlen($VIMRUNTIME)] !=# $VIMRUNTIME.sep && filewritable(dir) == 2 && !empty(split(glob(dir.'*.txt'))) && (!filereadable(dir.'tags') || filewritable(dir.'tags'))
229+
silent! execute 'helptags' pathogen#fnameescape(dir)
230230
endif
231231
endfor
232232
endfor

0 commit comments

Comments
 (0)