Mercurial > vim-gutentags
comparison autoload/gutentags/ctags.vim @ 177:7b9c2f191e69
Another take on fixing tcd brakeage
author | Henry Kupty <hkupty@gmail.com> |
---|---|
date | Thu, 09 Mar 2017 19:15:04 -0300 |
parents | 2cf3fb66285b |
children | 411f3fa915f5 |
comparison
equal
deleted
inserted
replaced
173:2cf3fb66285b | 177:7b9c2f191e69 |
---|---|
63 endfunction | 63 endfunction |
64 | 64 |
65 function! gutentags#ctags#generate(proj_dir, tags_file, write_mode) abort | 65 function! gutentags#ctags#generate(proj_dir, tags_file, write_mode) abort |
66 " Get to the tags file directory because ctags is finicky about | 66 " Get to the tags file directory because ctags is finicky about |
67 " these things. | 67 " these things. |
68 let l:prev_cwd = getcwd() | 68 let l:prev_cwd = gutentags#pwd() |
69 execute "chdir " . fnameescape(a:proj_dir) | 69 call gutentags#chdir(fnameescape(a:proj_dir)) |
70 | 70 |
71 let l:tags_file_exists = filereadable(a:tags_file) | 71 let l:tags_file_exists = filereadable(a:tags_file) |
72 let l:tags_file_is_local = match(a:tags_file, '\v[/\\]') < 0 | 72 let l:tags_file_is_local = match(a:tags_file, '\v[/\\]') < 0 |
73 | 73 |
74 if l:tags_file_exists && g:gutentags_ctags_check_tagfile | 74 if l:tags_file_exists && g:gutentags_ctags_check_tagfile |