patch 8.2.0286: cannot use popup_close() for a terminal popup
Problem: Cannot use popup_close() for a terminal popup.
Solution: Allow using popup_close(). (closes #5666)
diff --git a/src/popupwin.c b/src/popupwin.c
index 56d04b5..4078378 100644
--- a/src/popupwin.c
+++ b/src/popupwin.c
@@ -2360,7 +2360,12 @@
int id = (int)tv_get_number(argvars);
win_T *wp;
- if (ERROR_IF_ANY_POPUP_WINDOW)
+ if (
+# ifdef FEAT_TERMINAL
+ // if the popup contains a terminal it will become hidden
+ curbuf->b_term == NULL &&
+# endif
+ ERROR_IF_ANY_POPUP_WINDOW)
return;
wp = find_popup_win(id);