comparison src/window.c @ 18763:49b78d6465e5 v8.1.2371

patch 8.1.2371: FEAT_TEXT_PROP is a confusing name Commit: https://github.com/vim/vim/commit/05ad5ff0ab34ed9a5296dedd420ca81698b8ce22 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Nov 30 22:48:27 2019 +0100 patch 8.1.2371: FEAT_TEXT_PROP is a confusing name Problem: FEAT_TEXT_PROP is a confusing name. Solution: Use FEAT_PROP_POPUP. (Naruhiko Nishino, closes https://github.com/vim/vim/issues/5291)
author Bram Moolenaar <Bram@vim.org>
date Sat, 30 Nov 2019 23:00:05 +0100
parents 41484f342f80
children 15539899a112
comparison
equal deleted inserted replaced
18762:19582783e5ad 18763:49b78d6465e5
1424 * Return TRUE if "win" is a global popup or a popup in the current tab page. 1424 * Return TRUE if "win" is a global popup or a popup in the current tab page.
1425 */ 1425 */
1426 int 1426 int
1427 win_valid_popup(win_T *win UNUSED) 1427 win_valid_popup(win_T *win UNUSED)
1428 { 1428 {
1429 #ifdef FEAT_TEXT_PROP 1429 #ifdef FEAT_PROP_POPUP
1430 win_T *wp; 1430 win_T *wp;
1431 1431
1432 for (wp = first_popupwin; wp != NULL; wp = wp->w_next) 1432 for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
1433 if (wp == win) 1433 if (wp == win)
1434 return TRUE; 1434 return TRUE;
1471 FOR_ALL_WINDOWS_IN_TAB(tp, wp) 1471 FOR_ALL_WINDOWS_IN_TAB(tp, wp)
1472 { 1472 {
1473 if (wp == win) 1473 if (wp == win)
1474 return TRUE; 1474 return TRUE;
1475 } 1475 }
1476 #ifdef FEAT_TEXT_PROP 1476 #ifdef FEAT_PROP_POPUP
1477 for (wp = tp->tp_first_popupwin; wp != NULL; wp = wp->w_next) 1477 for (wp = tp->tp_first_popupwin; wp != NULL; wp = wp->w_next)
1478 if (wp == win) 1478 if (wp == win)
1479 return TRUE; 1479 return TRUE;
1480 #endif 1480 #endif
1481 } 1481 }
2523 // win_free(). 2523 // win_free().
2524 if (gui.in_use) 2524 if (gui.in_use)
2525 out_flush(); 2525 out_flush();
2526 #endif 2526 #endif
2527 2527
2528 #ifdef FEAT_TEXT_PROP 2528 #ifdef FEAT_PROP_POPUP
2529 if (popup_win_closed(win) && !win_valid(win)) 2529 if (popup_win_closed(win) && !win_valid(win))
2530 return FAIL; 2530 return FAIL;
2531 #endif 2531 #endif
2532 win_close_buffer(win, free_buf ? DOBUF_UNLOAD : 0, TRUE); 2532 win_close_buffer(win, free_buf ? DOBUF_UNLOAD : 0, TRUE);
2533 2533
2759 if (aucmd_win != NULL) 2759 if (aucmd_win != NULL)
2760 { 2760 {
2761 (void)win_free_mem(aucmd_win, &dummy, NULL); 2761 (void)win_free_mem(aucmd_win, &dummy, NULL);
2762 aucmd_win = NULL; 2762 aucmd_win = NULL;
2763 } 2763 }
2764 # ifdef FEAT_TEXT_PROP 2764 # ifdef FEAT_PROP_POPUP
2765 close_all_popups(); 2765 close_all_popups();
2766 # endif 2766 # endif
2767 2767
2768 while (firstwin != NULL) 2768 while (firstwin != NULL)
2769 (void)win_free_mem(firstwin, &dummy, NULL); 2769 (void)win_free_mem(firstwin, &dummy, NULL);
3776 int idx; 3776 int idx;
3777 3777
3778 # ifdef FEAT_DIFF 3778 # ifdef FEAT_DIFF
3779 diff_clear(tp); 3779 diff_clear(tp);
3780 # endif 3780 # endif
3781 # ifdef FEAT_TEXT_PROP 3781 # ifdef FEAT_PROP_POPUP
3782 while (tp->tp_first_popupwin != NULL) 3782 while (tp->tp_first_popupwin != NULL)
3783 popup_close_tabpage(tp, tp->tp_first_popupwin->w_id); 3783 popup_close_tabpage(tp, tp->tp_first_popupwin->w_id);
3784 #endif 3784 #endif
3785 for (idx = 0; idx < SNAP_COUNT; ++idx) 3785 for (idx = 0; idx < SNAP_COUNT; ++idx)
3786 clear_snapshot(tp, idx); 3786 clear_snapshot(tp, idx);
4684 if (restart_edit) 4684 if (restart_edit)
4685 redraw_later(VALID); /* causes status line redraw */ 4685 redraw_later(VALID); /* causes status line redraw */
4686 4686
4687 /* set window height to desired minimal value */ 4687 /* set window height to desired minimal value */
4688 if (curwin->w_height < p_wh && !curwin->w_p_wfh 4688 if (curwin->w_height < p_wh && !curwin->w_p_wfh
4689 #ifdef FEAT_TEXT_PROP 4689 #ifdef FEAT_PROP_POPUP
4690 && !popup_is_popup(curwin) 4690 && !popup_is_popup(curwin)
4691 #endif 4691 #endif
4692 ) 4692 )
4693 win_setheight((int)p_wh); 4693 win_setheight((int)p_wh);
4694 else if (curwin->w_height == 0) 4694 else if (curwin->w_height == 0)
4950 #endif /* FEAT_GUI */ 4950 #endif /* FEAT_GUI */
4951 4951
4952 #ifdef FEAT_MENU 4952 #ifdef FEAT_MENU
4953 remove_winbar(wp); 4953 remove_winbar(wp);
4954 #endif 4954 #endif
4955 #ifdef FEAT_TEXT_PROP 4955 #ifdef FEAT_PROP_POPUP
4956 free_callback(&wp->w_close_cb); 4956 free_callback(&wp->w_close_cb);
4957 free_callback(&wp->w_filter_cb); 4957 free_callback(&wp->w_filter_cb);
4958 for (i = 0; i < 4; ++i) 4958 for (i = 0; i < 4; ++i)
4959 VIM_CLEAR(wp->w_border_highlight[i]); 4959 VIM_CLEAR(wp->w_border_highlight[i]);
4960 vim_free(wp->w_scrollbar_highlight); 4960 vim_free(wp->w_scrollbar_highlight);
4989 win_unlisted(win_T *wp) 4989 win_unlisted(win_T *wp)
4990 { 4990 {
4991 return wp == aucmd_win || WIN_IS_POPUP(wp); 4991 return wp == aucmd_win || WIN_IS_POPUP(wp);
4992 } 4992 }
4993 4993
4994 #if defined(FEAT_TEXT_PROP) || defined(PROTO) 4994 #if defined(FEAT_PROP_POPUP) || defined(PROTO)
4995 /* 4995 /*
4996 * Free a popup window. This does not take the window out of the window list 4996 * Free a popup window. This does not take the window out of the window list
4997 * and assumes there is only one toplevel frame, no split. 4997 * and assumes there is only one toplevel frame, no split.
4998 */ 4998 */
4999 void 4999 void