comparison src/window.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 ce8c47ed54e5
children 2142fb624658
comparison
equal deleted inserted replaced
19270:6eca0794f137 19271:ebeeb4b4a1fa
120 int type = FIND_DEFINE; 120 int type = FIND_DEFINE;
121 int len; 121 int len;
122 #endif 122 #endif
123 char_u cbuf[40]; 123 char_u cbuf[40];
124 124
125 if (ERROR_IF_POPUP_WINDOW) 125 if (ERROR_IF_ANY_POPUP_WINDOW)
126 return; 126 return;
127 127
128 #ifdef FEAT_CMDWIN 128 #ifdef FEAT_CMDWIN
129 # define CHECK_CMDWIN \ 129 # define CHECK_CMDWIN \
130 do { \ 130 do { \
782 * return FAIL for failure, OK otherwise 782 * return FAIL for failure, OK otherwise
783 */ 783 */
784 int 784 int
785 win_split(int size, int flags) 785 win_split(int size, int flags)
786 { 786 {
787 if (ERROR_IF_POPUP_WINDOW) 787 if (ERROR_IF_ANY_POPUP_WINDOW)
788 return FAIL; 788 return FAIL;
789 789
790 // When the ":tab" modifier was used open a new tab page instead. 790 // When the ":tab" modifier was used open a new tab page instead.
791 if (may_open_tabpage() == OK) 791 if (may_open_tabpage() == OK)
792 return OK; 792 return OK;
1572 frame_T *frp2; 1572 frame_T *frp2;
1573 win_T *wp; 1573 win_T *wp;
1574 win_T *wp2; 1574 win_T *wp2;
1575 int temp; 1575 int temp;
1576 1576
1577 if (ERROR_IF_POPUP_WINDOW) 1577 if (ERROR_IF_ANY_POPUP_WINDOW)
1578 return; 1578 return;
1579 if (ONE_WINDOW) // just one window 1579 if (ONE_WINDOW) // just one window
1580 { 1580 {
1581 beep_flush(); 1581 beep_flush();
1582 return; 1582 return;
2439 frame_T *win_frame = win->w_frame->fr_parent; 2439 frame_T *win_frame = win->w_frame->fr_parent;
2440 #ifdef FEAT_DIFF 2440 #ifdef FEAT_DIFF
2441 int had_diffmode = win->w_p_diff; 2441 int had_diffmode = win->w_p_diff;
2442 #endif 2442 #endif
2443 2443
2444 if (ERROR_IF_POPUP_WINDOW) 2444 if (ERROR_IF_ANY_POPUP_WINDOW)
2445 return FAIL; 2445 return FAIL;
2446 2446
2447 if (last_window()) 2447 if (last_window())
2448 { 2448 {
2449 emsg(_("E444: Cannot close last window")); 2449 emsg(_("E444: Cannot close last window"));
4342 #ifdef FEAT_CONCEAL 4342 #ifdef FEAT_CONCEAL
4343 win_T *owp = curwin; 4343 win_T *owp = curwin;
4344 #endif 4344 #endif
4345 4345
4346 #ifdef FEAT_PROP_POPUP 4346 #ifdef FEAT_PROP_POPUP
4347 if (ERROR_IF_POPUP_WINDOW || ERROR_IF_TERM_POPUP_WINDOW) 4347 if (ERROR_IF_ANY_POPUP_WINDOW)
4348 return; 4348 return;
4349 if (popup_is_popup(wp)) 4349 if (popup_is_popup(wp))
4350 { 4350 {
4351 emsg(_("E366: Not allowed to enter a popup window")); 4351 emsg(_("E366: Not allowed to enter a popup window"));
4352 return; 4352 return;