async: do not clean up job dir for running jobs

closed #1929
This commit is contained in:
Christian Brabandt 2019-06-03 08:21:39 +02:00
parent c7b8a56b22
commit 3921bc13a3
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09

View File

@ -185,7 +185,10 @@ if v:version >= 800 && has("job")
if job_status(get(jobs, a:file)) == 'run' if job_status(get(jobs, a:file)) == 'run'
return return
elseif has_key(jobs, a:file) elseif has_key(jobs, a:file)
call remove(jobs, a:file) " still running
return
" jobs dict should be cleaned on exit, so not needed here
" call remove(jobs, a:file)
endif endif
endif endif
let id = job_start(cmd, { let id = job_start(cmd, {
@ -312,7 +315,10 @@ elseif has("nvim")
let s:clean_jobs[a:vcs] = {} let s:clean_jobs[a:vcs] = {}
endif endif
if has_key(s:clean_jobs[a:vcs], a:file) if has_key(s:clean_jobs[a:vcs], a:file)
call remove(s:clean_jobs[a:vcs], a:file) " still running
return
" jobs dict should be cleaned on exit, so not needed here
" call remove(s:clean_jobs[a:vcs], a:file)
endif endif
let id = jobstart(cmd, config) let id = jobstart(cmd, config)
call s:set_clean_jobs_variable(a:vcs, a:file, id) call s:set_clean_jobs_variable(a:vcs, a:file, id)