From c9fb89dd6efdeedb95c411ec78b3a9493602d33d Mon Sep 17 00:00:00 2001 From: Alex Efros Date: Thu, 19 Jan 2012 19:13:59 +0200 Subject: [PATCH] Fix error in :Helptags Error happens if ~/.vim/doc/ doesn't contain any files, but contain some subdirectories. --- autoload/pathogen.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/pathogen.vim b/autoload/pathogen.vim index df4f22d..3accbe6 100644 --- a/autoload/pathogen.vim +++ b/autoload/pathogen.vim @@ -166,7 +166,7 @@ let s:done_bundles = '' function! pathogen#helptags() " {{{1 let sep = pathogen#separator() for dir in pathogen#split(&rtp) - if (dir.sep)[0 : strlen($VIMRUNTIME)] !=# $VIMRUNTIME.sep && filewritable(dir.sep.'doc') == 2 && !empty(glob(dir.sep.'doc'.sep.'*')) && (!filereadable(dir.sep.'doc'.sep.'tags') || filewritable(dir.sep.'doc'.sep.'tags')) + 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')) helptags `=dir.'/doc'` endif endfor