diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-05-29 22:37:05 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-05-29 22:37:05 +0100 |
commit | 9e636b9d2ef54552383daebf290d916b3d001823 (patch) | |
tree | de1946ef20a5338f42dbf38b36c8e748b989001a /src/terminal.c | |
parent | fc376e0b1a36a2ef153e28752c61342554386886 (diff) | |
download | vim-git-9e636b9d2ef54552383daebf290d916b3d001823.tar.gz |
patch 8.2.5041: cannot close a terminal popup with "NONE" jobv8.2.5041
Problem: Cannot close a terminal popup with "NONE" job.
Solution: Adjust the conditions for whether a job is running.
(closes #10498)
Diffstat (limited to 'src/terminal.c')
-rw-r--r-- | src/terminal.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/terminal.c b/src/terminal.c index 6df37220b..fddd087c9 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -1630,6 +1630,16 @@ term_job_running(term_T *term) } /* + * 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". */ int @@ -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; |