Handle cases where the ctags binary is installed in a directory with spaces

This commit is contained in:
Jan Larres 2011-03-28 23:52:05 +13:00
parent 276fa842dc
commit efcf31ba74

View File

@ -1029,7 +1029,12 @@ function! s:ProcessFile(fname, ftype)
let ctags_args .= ' --language-force=' . ctags_type .
\ ' --' . ctags_type . '-kinds=' . ctags_kinds . ' '
let ctags_cmd = g:tagbar_ctags_bin . ctags_args . shellescape(a:fname)
if has('win32') || has('win64')
let ctags_bin = fnamemodify(g:tagbar_ctags_bin, ':8')
else
let ctags_bin = shellescape(g:tagbar_ctags_bin)
endif
let ctags_cmd = ctags_bin . ctags_args . shellescape(a:fname)
let ctags_output = system(ctags_cmd)
if v:shell_error