comparison autoload/gutentags/ctags.vim @ 249:36dabe30ab6e

Double escape spaces when setting tags path
author Yukun Lin <me@yukun.io>
date Mon, 05 Aug 2019 22:09:31 +0900
parents ac312dc3c111
children 56dc6f8e5472
comparison
equal deleted inserted replaced
248:57654e0dea1c 249:36dabe30ab6e
51 let b:gutentags_files['ctags'] = gutentags#get_cachefile( 51 let b:gutentags_files['ctags'] = gutentags#get_cachefile(
52 \a:project_root, l:tagfile) 52 \a:project_root, l:tagfile)
53 53
54 " Set the tags file for Vim to use. 54 " Set the tags file for Vim to use.
55 if g:gutentags_ctags_auto_set_tags 55 if g:gutentags_ctags_auto_set_tags
56 execute 'setlocal tags^=' . fnameescape(b:gutentags_files['ctags']) 56 if has('win32') || has('win64')
57 execute 'setlocal tags^=' . fnameescape(b:gutentags_files['ctags'])
58 else
59 " spaces must be literally escaped in tags path
60 let l:literal_space_escaped = substitute(fnameescape(b:gutentags_files['ctags']), '\ ', '\\\\ ', 'g')
61 execute 'setlocal tags^=' . l:literal_space_escaped
62 endif
57 endif 63 endif
58 64
59 " Check if the ctags executable exists. 65 " Check if the ctags executable exists.
60 if s:did_check_exe == 0 66 if s:did_check_exe == 0
61 if g:gutentags_enabled && executable(expand(g:gutentags_ctags_executable, 1)) == 0 67 if g:gutentags_enabled && executable(expand(g:gutentags_ctags_executable, 1)) == 0