From f03011b955f4dfaf69e59ccec745045f323fce47 Mon Sep 17 00:00:00 2001 From: Jan Larres Date: Sat, 15 Oct 2011 18:48:29 +1300 Subject: [PATCH] Temporarily reset 'wildignore' when calling expand() --- autoload/tagbar.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index 2b27b83..5c5d725 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -53,7 +53,14 @@ if !exists('g:tagbar_ctags_bin') finish endif else + " reset 'wildignore' temporarily in case *.exe is included in it + let wildignore_save = &wildignore + set wildignore& + let g:tagbar_ctags_bin = expand(g:tagbar_ctags_bin) + + let &wildignore = wildignore_save + if !executable(g:tagbar_ctags_bin) echomsg 'Tagbar: Exuberant ctags not found in specified place,' \ 'skipping plugin' @@ -1647,7 +1654,11 @@ function! s:ExecuteCtagsOnFile(fname, ftype) endif if has_key(typeinfo, 'ctagsbin') + " reset 'wildignore' temporarily in case *.exe is included in it + let wildignore_save = &wildignore + set wildignore& let ctags_bin = expand(typeinfo.ctagsbin) + let &wildignore = wildignore_save else let ctags_bin = g:tagbar_ctags_bin endif