From c2569c5de4b0c74a4cab8b8916df74817e2a2cce Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Fri, 19 Aug 2011 21:15:15 -0400 Subject: [PATCH] Support space and comma paths with tags --- plugin/fugitive.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 2113b65..702026e 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -144,10 +144,10 @@ function! s:Detect(path) if expand('%:p') =~# '//' call buffer.setvar('&path',s:sub(buffer.getvar('&path'),'^\.%(,|$)','')) endif - if b:git_dir !~# ',' && stridx(buffer.getvar('&tags'),b:git_dir.'/tags') == -1 - call buffer.setvar('&tags',b:git_dir.'/tags'.','.buffer.getvar('&tags')) + if stridx(buffer.getvar('&tags'),escape(b:git_dir.'/tags',', ')) == -1 + call buffer.setvar('&tags',escape(b:git_dir.'/tags',', ').','.buffer.getvar('&tags')) if &filetype != '' - call buffer.setvar('&tags',b:git_dir.'/'.&filetype.'.tags'.','.buffer.getvar('&tags')) + call buffer.setvar('&tags',escape(b:git_dir.'/'.&filetype.'.tags',', ').','.buffer.getvar('&tags')) endif endif endif