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.
diff --git a/src/window.c b/src/window.c
index aeafb26..23037fe 100644
--- a/src/window.c
+++ b/src/window.c
@@ -2441,6 +2441,11 @@
int had_diffmode = win->w_p_diff;
#endif
+#if defined(FEAT_TERMINAL) && defined(FEAT_PROP_POPUP)
+ // Can close a popup window with a terminal if the job has finished.
+ if (may_close_term_popup() == OK)
+ return OK;
+#endif
if (ERROR_IF_ANY_POPUP_WINDOW)
return FAIL;
@@ -6439,6 +6444,12 @@
int count = 0;
win_T *wp;
+#if defined(FEAT_PROP_POPUP)
+ // If the current window is a popup then there always is another window.
+ if (popup_is_popup(curwin))
+ return FALSE;
+#endif
+
// If there is another tab page there always is another window.
if (first_tabpage->tp_next != NULL)
return FALSE;