0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 8.2.5041: cannot close a terminal popup with "NONE" job

Problem:    Cannot close a terminal popup with "NONE" job.
Solution:   Adjust the conditions for whether a job is running.
            (closes #10498)
This commit is contained in:
Bram Moolenaar
2022-05-29 22:37:05 +01:00
parent fc376e0b1a
commit 9e636b9d2e
6 changed files with 36 additions and 5 deletions

View File

@@ -1629,6 +1629,16 @@ term_job_running(term_T *term)
return term_job_running_check(term, FALSE);
}
/*
* Return TRUE if the job for "term" is still running, ignoring the job was
* "NONE".
*/
int
term_job_running_not_none(term_T *term)
{
return term_job_running(term) && !term_none_open(term);
}
/*
* Return TRUE if "term" has an active channel and used ":term NONE".
*/
@@ -3512,7 +3522,7 @@ term_after_channel_closed(term_T *term)
may_close_term_popup(void)
{
if (popup_is_popup(curwin) && curbuf->b_term != NULL
&& !term_job_running(curbuf->b_term))
&& !term_job_running_not_none(curbuf->b_term))
{
win_T *pwin = curwin;