1
0
forked from aniani/vim

patch 8.0.0746: when :term fails the job is not properly cleaned up

Problem:    When :term fails the job is not properly cleaned up.
Solution:   Free the terminal. Handle a job that failed to start. (closes
            #1858)
This commit is contained in:
Bram Moolenaar
2017-07-22 18:39:00 +02:00
parent 9f1f49b839
commit 61a6605ea1
4 changed files with 18 additions and 3 deletions

View File

@@ -5189,6 +5189,11 @@ job_stop(job_T *job, typval_T *argvars, char *type)
return 0;
}
}
if (job->jv_status == JOB_FAILED)
{
ch_log(job->jv_channel, "Job failed to start, job_stop() skipped");
return 0;
}
if (job->jv_status == JOB_ENDED)
{
ch_log(job->jv_channel, "Job has already ended, job_stop() skipped");