forked from aniani/vim
patch 8.0.0801: terminal window title says "running" after job exits
Problem: The terminal window title sometimes still says "running" even though the job has finished. Solution: Also consider the job finished when the channel has been closed.
This commit is contained in:
@@ -491,7 +491,11 @@ term_convert_key(int c, char *buf)
|
||||
static int
|
||||
term_job_running(term_T *term)
|
||||
{
|
||||
return term->tl_job != NULL && term->tl_job->jv_status == JOB_STARTED;
|
||||
/* Also consider the job finished when the channel is closed, to avoid a
|
||||
* race condition when updating the title. */
|
||||
return term->tl_job != NULL
|
||||
&& term->tl_job->jv_status == JOB_STARTED
|
||||
&& channel_is_open(term->tl_job->jv_channel);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user