Mercurial > vim-gutentags
changeset 179:411f3fa915f5
Back to getcwd()
this makes changes only when changing dir, not when reading current working directory.
author | Henry Kupty <hkupty@gmail.com> |
---|---|
date | Mon, 13 Mar 2017 12:07:21 -0300 |
parents | c2e0dac0be42 |
children | 8bac4b955c84 |
files | autoload/gutentags.vim autoload/gutentags/cscope.vim autoload/gutentags/ctags.vim autoload/gutentags/gtags_cscope.vim |
diffstat | 4 files changed, 6 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- 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",
--- 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
--- 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
--- 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 = {