1
0
forked from aniani/vim

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)
This commit is contained in:
Bram Moolenaar
2020-02-20 20:12:29 +01:00
parent 0bbf722aaa
commit 11ec807639
6 changed files with 56 additions and 4 deletions

View File

@@ -2360,7 +2360,12 @@ f_popup_close(typval_T *argvars, typval_T *rettv UNUSED)
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);