changeset 40:8b3c611a4d3b

Support project directories with spaces in them. Note that ctags seems to not like spaces in the output tags file, so it's a good idea to put tags somewhere else with `g:gutentags_cache_dir`.
author Ludovic Chabant <ludovic@chabant.com>
date Sat, 10 Jan 2015 20:45:49 -0800
parents 448c128e2952
children 99328cb71e75
files plugin/gutentags.vim
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugin/gutentags.vim	Fri Jan 09 09:01:32 2015 -0800
+++ b/plugin/gutentags.vim	Sat Jan 10 20:45:49 2015 -0800
@@ -190,7 +190,7 @@
 
     " Set the tags file for Vim to use.
     if g:gutentags_auto_set_tags
-        execute 'setlocal tags^=' . b:gutentags_file
+        execute 'setlocal tags^=' . fnameescape(b:gutentags_file)
     endif
 
     " Autocommands for updating the tags on save.
@@ -370,7 +370,7 @@
         call s:trace("")
     finally
         " Restore the current directory...
-        execute "chdir " . l:prev_cwd
+        execute "chdir " . fnameescape(l:prev_cwd)
     endtry
 endfunction