# HG changeset patch # User Ludovic Chabant # Date 1490310024 25200 # Node ID 8bac4b955c84582ba7017e7405469a3517e4b5c3 # Parent 3d7f2bf017fd5ad7ce5268ca534a0cf7a60f6147# Parent 411f3fa915f566186fbceea73518101aba186f1d Merge pull request #117 from GitHub. diff -r 3d7f2bf017fd -r 8bac4b955c84 autoload/gutentags.vim --- a/autoload/gutentags.vim Sat Mar 11 21:50:00 2017 -0800 +++ b/autoload/gutentags.vim Thu Mar 23 16:00:24 2017 -0700 @@ -2,14 +2,6 @@ " Utilities {{{ -function! gutentags#pwd() - if has('nvim') - return haslocaldir() ? getcwd(0, 0) : haslocaldir(-1, 0) ? getcwd(-1, 0) : getcwd() - else - return haslocaldir() ? getcwd(0, 0) : getcwd() - endif -endfunction - function! gutentags#chdir(path) if has('nvim') let chdir = haslocaldir() ? 'lcd' : haslocaldir(-1, 0) ? 'tcd' : 'cd' @@ -402,7 +394,7 @@ " Switch to the project root to make the command line smaller, and make " it possible to get the relative path of the filename to parse if we're " doing an incremental update. - let l:prev_cwd = gutentags#pwd() + let l:prev_cwd = getcwd() call gutentags#chdir(fnameescape(l:proj_dir)) try call call("gutentags#".a:module."#generate", diff -r 3d7f2bf017fd -r 8bac4b955c84 autoload/gutentags/cscope.vim --- a/autoload/gutentags/cscope.vim Sat Mar 11 21:50:00 2017 -0800 +++ b/autoload/gutentags/cscope.vim Thu Mar 23 16:00:24 2017 -0700 @@ -64,7 +64,7 @@ let l:cmd .= gutentags#get_execute_cmd_suffix() call gutentags#trace("Running: " . l:cmd) - call gutentags#trace("In: " . gutentags#pwd()) + call gutentags#trace("In: " . getcwd()) if !g:gutentags_fake if !(has('nvim') && exists('*jobwait')) if !g:gutentags_trace diff -r 3d7f2bf017fd -r 8bac4b955c84 autoload/gutentags/ctags.vim --- a/autoload/gutentags/ctags.vim Sat Mar 11 21:50:00 2017 -0800 +++ b/autoload/gutentags/ctags.vim Thu Mar 23 16:00:24 2017 -0700 @@ -66,7 +66,7 @@ " Get to the tags file directory because ctags is finicky about " these things. let l:prev_cwd = getcwd() - execute "chdir " . fnameescape(a:proj_dir) + 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 @@ -170,7 +170,7 @@ let l:cmd .= gutentags#get_execute_cmd_suffix() call gutentags#trace("Running: " . l:cmd) - call gutentags#trace("In: " . gutentags#pwd()) + call gutentags#trace("In: " . getcwd()) if !g:gutentags_fake " Run the background process. if !g:gutentags_trace diff -r 3d7f2bf017fd -r 8bac4b955c84 autoload/gutentags/gtags_cscope.vim --- a/autoload/gutentags/gtags_cscope.vim Sat Mar 11 21:50:00 2017 -0800 +++ b/autoload/gutentags/gtags_cscope.vim Thu Mar 23 16:00:24 2017 -0700 @@ -151,7 +151,7 @@ let l:use_jobs = has('job') let l:prev_cwd = getcwd() - execute "chdir " . fnameescape(a:proj_dir) + 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) @@ -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