Mercurial > vim-gutentags
comparison autoload/gutentags/ctags.vim @ 133:6f15299869fc
Don't pass absolute paths to `ctags` when we want relative paths from it.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Wed, 20 Jul 2016 13:43:41 +0200 |
parents | a66d90fd758b |
children | 4c9e2de7d46a |
comparison
equal
deleted
inserted
replaced
132:a6ef1c860d07 | 133:6f15299869fc |
---|---|
72 let l:cmd = gutentags#get_execute_cmd() . s:runner_exe | 72 let l:cmd = gutentags#get_execute_cmd() . s:runner_exe |
73 let l:cmd .= ' -e "' . s:get_ctags_executable(a:proj_dir) . '"' | 73 let l:cmd .= ' -e "' . s:get_ctags_executable(a:proj_dir) . '"' |
74 let l:cmd .= ' -t "' . l:actual_tags_file . '"' | 74 let l:cmd .= ' -t "' . l:actual_tags_file . '"' |
75 let l:cmd .= ' -p "' . l:actual_proj_dir . '"' | 75 let l:cmd .= ' -p "' . l:actual_proj_dir . '"' |
76 if a:write_mode == 0 && l:tags_file_exists | 76 if a:write_mode == 0 && l:tags_file_exists |
77 let l:full_path = expand('%:p') | 77 let l:cur_file_path = expand('%:p') |
78 let l:cmd .= ' -s "' . l:full_path . '"' | 78 if empty(g:gutentags_cache_dir) |
79 let l:cur_file_path = fnamemodify(l:cur_file_path, ':.') | |
80 endif | |
81 let l:cmd .= ' -s "' . l:cur_file_path . '"' | |
79 endif | 82 endif |
80 " Pass the Gutentags options file first, and then the project specific | 83 " Pass the Gutentags options file first, and then the project specific |
81 " one, so that users can override the default behaviour. | 84 " one, so that users can override the default behaviour. |
82 let l:cmd .= ' -o "' . gutentags#get_res_file('ctags.options') . '"' | 85 let l:cmd .= ' -o "' . gutentags#get_res_file('ctags.options') . '"' |
83 let l:proj_options_file = a:proj_dir . '/' . | 86 let l:proj_options_file = a:proj_dir . '/' . |