Mercurial > vim-gutentags
comparison autoload/gutentags/ctags.vim @ 267:6030953258fe
On Windows, kill ongoing jobs before leaving so we can clean-up temp files
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 12 May 2022 09:20:21 -0700 |
parents | 81d51b4a2a78 |
children | 8ddbcbfa57b2 |
comparison
equal
deleted
inserted
replaced
266:1b74fb3819e1 | 267:6030953258fe |
---|---|
212 call gutentags#trace("(fake... not actually running)") | 212 call gutentags#trace("(fake... not actually running)") |
213 endif | 213 endif |
214 endfunction | 214 endfunction |
215 | 215 |
216 function! gutentags#ctags#on_job_exit(job, exit_val) abort | 216 function! gutentags#ctags#on_job_exit(job, exit_val) abort |
217 call gutentags#remove_job_by_data('ctags', a:job) | 217 let [l:tags_file, l:job_data] = gutentags#remove_job_by_data('ctags', a:job) |
218 | 218 |
219 if a:exit_val != 0 && !g:__gutentags_vim_is_leaving | 219 if a:exit_val != 0 && !g:__gutentags_vim_is_leaving |
220 call gutentags#warning("ctags job failed, returned: ". | 220 call gutentags#warning("ctags job failed, returned: ". |
221 \string(a:exit_val)) | 221 \string(a:exit_val)) |
222 endif | |
223 if has('win32') && g:__gutentags_vim_is_leaving | |
224 " The process got interrupted because Vim is quitting. | |
225 " Remove the tags and lock files on Windows because there's no `trap` | |
226 " statement in update script. | |
227 try | call delete(l:tags_file) | endtry | |
228 try | call delete(l:tags_file.'.temp') | endtry | |
229 try | call delete(l:tags_file.'.lock') | endtry | |
222 endif | 230 endif |
223 endfunction | 231 endfunction |
224 | 232 |
225 " }}} | 233 " }}} |
226 | 234 |