Mercurial > vim-gutentags
changeset 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 | c2e0dac0be42 |
files | autoload/gutentags/ctags.vim autoload/gutentags/gtags_cscope.vim |
diffstat | 2 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/autoload/gutentags/ctags.vim Tue Feb 21 12:36:45 2017 -0800 +++ b/autoload/gutentags/ctags.vim Thu Mar 09 19:15:04 2017 -0300 @@ -65,8 +65,8 @@ function! gutentags#ctags#generate(proj_dir, tags_file, write_mode) abort " Get to the tags file directory because ctags is finicky about " these things. - let l:prev_cwd = getcwd() - execute "chdir " . fnameescape(a:proj_dir) + let l:prev_cwd = gutentags#pwd() + call gutentags#chdir(fnameescape(a:proj_dir)) let l:tags_file_exists = filereadable(a:tags_file) let l:tags_file_is_local = match(a:tags_file, '\v[/\\]') < 0
--- a/autoload/gutentags/gtags_cscope.vim Tue Feb 21 12:36:45 2017 -0800 +++ b/autoload/gutentags/gtags_cscope.vim Thu Mar 09 19:15:04 2017 -0300 @@ -150,8 +150,8 @@ let l:use_jobs = has('job') - let l:prev_cwd = getcwd() - execute "chdir " . fnameescape(a:proj_dir) + let l:prev_cwd = gutentags#pwd() + call gutentags#chdir(fnameescape(a:proj_dir)) try if has('win32') let l:cmd = s:get_win32_cmd(l:use_jobs, l:proj_options, l:db_path) @@ -160,7 +160,7 @@ endif call gutentags#trace("Running: " . string(l:cmd)) - call gutentags#trace("In: " . getcwd()) + call gutentags#trace("In: " . gutentags#pwd()) if !g:gutentags_fake if l:use_jobs let l:job_opts = { @@ -189,7 +189,7 @@ call gutentags#trace("") finally " Restore the previous working directory. - execute "chdir " . fnameescape(l:prev_cwd) + call gutentags#chdir(fnameescape(l:prev_cwd)) endtry endfunction