# HG changeset patch # User Henry Kupty # Date 1489417641 10800 # Node ID 411f3fa915f566186fbceea73518101aba186f1d # Parent c2e0dac0be4259bcae123f80efd7592377023375 Back to getcwd() this makes changes only when changing dir, not when reading current working directory. diff -r c2e0dac0be42 -r 411f3fa915f5 autoload/gutentags.vim --- a/autoload/gutentags.vim Thu Mar 09 20:03:06 2017 -0300 +++ b/autoload/gutentags.vim Mon Mar 13 12:07:21 2017 -0300 @@ -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 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 c2e0dac0be42 -r 411f3fa915f5 autoload/gutentags/cscope.vim --- a/autoload/gutentags/cscope.vim Thu Mar 09 20:03:06 2017 -0300 +++ b/autoload/gutentags/cscope.vim Mon Mar 13 12:07:21 2017 -0300 @@ -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 c2e0dac0be42 -r 411f3fa915f5 autoload/gutentags/ctags.vim --- a/autoload/gutentags/ctags.vim Thu Mar 09 20:03:06 2017 -0300 +++ b/autoload/gutentags/ctags.vim Mon Mar 13 12:07:21 2017 -0300 @@ -65,7 +65,7 @@ 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 = gutentags#pwd() + let l:prev_cwd = getcwd() call gutentags#chdir(fnameescape(a:proj_dir)) let l:tags_file_exists = filereadable(a:tags_file) @@ -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 c2e0dac0be42 -r 411f3fa915f5 autoload/gutentags/gtags_cscope.vim --- a/autoload/gutentags/gtags_cscope.vim Thu Mar 09 20:03:06 2017 -0300 +++ b/autoload/gutentags/gtags_cscope.vim Mon Mar 13 12:07:21 2017 -0300 @@ -150,7 +150,7 @@ let l:use_jobs = has('job') - let l:prev_cwd = gutentags#pwd() + let l:prev_cwd = getcwd() call gutentags#chdir(fnameescape(a:proj_dir)) try if has('win32') @@ -160,7 +160,7 @@ endif call gutentags#trace("Running: " . string(l:cmd)) - call gutentags#trace("In: " . gutentags#pwd()) + call gutentags#trace("In: " . getcwd()) if !g:gutentags_fake if l:use_jobs let l:job_opts = {