Mercurial > vim
diff src/popupwin.c @ 19271:ebeeb4b4a1fa v8.2.0194
patch 8.2.0194: some commands can cause problems in terminal popup
Commit: https://github.com/vim/vim/commit/3c01c4a02897163996639f6f2604c68eab2bd18b
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 1 23:04:24 2020 +0100
patch 8.2.0194: some commands can cause problems in terminal popup
Problem: Some commands can cause problems in terminal popup.
Solution: Disallow more commands.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 01 Feb 2020 23:15:03 +0100 |
parents | c7903f92ed75 |
children | 2142fb624658 |
line wrap: on
line diff
--- a/src/popupwin.c +++ b/src/popupwin.c @@ -2360,7 +2360,7 @@ f_popup_close(typval_T *argvars, typval_ int id = (int)tv_get_number(argvars); win_T *wp; - if (ERROR_IF_POPUP_WINDOW) + if (ERROR_IF_ANY_POPUP_WINDOW) return; wp = find_popup_win(id); @@ -2511,7 +2511,7 @@ popup_close_tabpage(tabpage_T *tp, int i void close_all_popups(void) { - if (ERROR_IF_POPUP_WINDOW) + if (ERROR_IF_ANY_POPUP_WINDOW) return; while (first_popupwin != NULL) popup_close(first_popupwin->w_id); @@ -2845,14 +2845,14 @@ f_popup_getoptions(typval_T *argvars, ty } int -error_if_popup_window() +error_if_popup_window(int also_with_term UNUSED) { // win_execute() may set "curwin" to a popup window temporarily, but many // commands are disallowed then. When a terminal runs in the popup most // things are allowed. if (WIN_IS_POPUP(curwin) # ifdef FEAT_TERMINAL - && curbuf->b_term == NULL + && (also_with_term || curbuf->b_term == NULL) # endif ) {