Mercurial > vim-gutentags
comparison autoload/gutentags/ctags.vim @ 256:950647497ae5
Make tag relative paths work correctly when no extra args are defined.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 04 Feb 2020 23:11:23 -0800 |
parents | 52be4cf89810 |
children | 81d51b4a2a78 |
comparison
equal
deleted
inserted
replaced
255:13ab8af33bc1 | 256:950647497ae5 |
---|---|
167 " Pass the Gutentags recursive options file before the project | 167 " Pass the Gutentags recursive options file before the project |
168 " options file, so that users can override --recursive. | 168 " options file, so that users can override --recursive. |
169 " Omit --recursive if this project uses a file list command. | 169 " Omit --recursive if this project uses a file list command. |
170 let l:cmd += ['-o', '"' . gutentags#get_res_file('ctags_recursive.options') . '"'] | 170 let l:cmd += ['-o', '"' . gutentags#get_res_file('ctags_recursive.options') . '"'] |
171 endif | 171 endif |
172 if !empty(g:gutentags_ctags_extra_args) | 172 if l:use_tag_relative_opt |
173 let l:extra_args = join(g:gutentags_ctags_extra_args) | 173 let l:cmd += ['-O', shellescape("--tag-relative=yes")] |
174 if l:use_tag_relative_opt | 174 endif |
175 let l:extra_args .= " --tag-relative=yes" | 175 for extra_arg in g:gutentags_ctags_extra_args |
176 endif | 176 let l:cmd += ['-O', shellescape(extra_arg)] |
177 let l:cmd += ['-O', shellescape(l:extra_args)] | 177 endfor |
178 endif | |
179 if !empty(g:gutentags_ctags_post_process_cmd) | 178 if !empty(g:gutentags_ctags_post_process_cmd) |
180 let l:cmd += ['-P', shellescape(g:gutentags_ctags_post_process_cmd)] | 179 let l:cmd += ['-P', shellescape(g:gutentags_ctags_post_process_cmd)] |
181 endif | 180 endif |
182 let l:proj_options_file = a:proj_dir . '/' . | 181 let l:proj_options_file = a:proj_dir . '/' . |
183 \g:gutentags_ctags_options_file | 182 \g:gutentags_ctags_options_file |