From efcf31ba7439787715875b43e9b285b8cd1e7ffa Mon Sep 17 00:00:00 2001 From: Jan Larres Date: Mon, 28 Mar 2011 23:52:05 +1300 Subject: [PATCH] Handle cases where the ctags binary is installed in a directory with spaces --- plugin/tagbar.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugin/tagbar.vim b/plugin/tagbar.vim index 8d12ce3..3e8f02d 100644 --- a/plugin/tagbar.vim +++ b/plugin/tagbar.vim @@ -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