comparison autoload/gutentags/ctags.vim @ 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 7b9c2f191e69
children 0b4ccd0deceb
comparison
equal deleted inserted replaced
178:c2e0dac0be42 179:411f3fa915f5
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 = gutentags#pwd() 68 let l:prev_cwd = getcwd()
69 call gutentags#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
168 endif 168 endif
169 endif 169 endif
170 let l:cmd .= gutentags#get_execute_cmd_suffix() 170 let l:cmd .= gutentags#get_execute_cmd_suffix()
171 171
172 call gutentags#trace("Running: " . l:cmd) 172 call gutentags#trace("Running: " . l:cmd)
173 call gutentags#trace("In: " . gutentags#pwd()) 173 call gutentags#trace("In: " . getcwd())
174 if !g:gutentags_fake 174 if !g:gutentags_fake
175 " Run the background process. 175 " Run the background process.
176 if !g:gutentags_trace 176 if !g:gutentags_trace
177 silent execute l:cmd 177 silent execute l:cmd
178 else 178 else