0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.0196: blocking commands for a finished job in a popup window

Problem:    Blocking commands for a finished job in a popup window.
Solution:   Do not block commands if the job has finished.  Adjust test.
This commit is contained in:
Bram Moolenaar
2020-02-02 15:25:16 +01:00
parent 3180fe6c6d
commit d98c0b63ab
6 changed files with 55 additions and 3 deletions

View File

@@ -2863,10 +2863,15 @@ error_if_popup_window(int also_with_term UNUSED)
}
# if defined(FEAT_TERMINAL) || defined(PROTO)
/*
* Return TRUE if the current window is running a terminal in a popup window.
* Return FALSE when the job has ended.
*/
int
error_if_term_popup_window()
{
if (WIN_IS_POPUP(curwin) && curbuf->b_term != NULL)
if (WIN_IS_POPUP(curwin) && curbuf->b_term != NULL
&& term_job_running(curbuf->b_term))
{
emsg(_("E899: Not allowed for a terminal in a popup window"));
return TRUE;