0
0
mirror of https://github.com/vim/vim.git synced 2025-10-02 05:04:20 -04:00

patch 8.1.1400: using global pointer for tab-local popups is clumsy

Problem:    Using global pointer for tab-local popups is clumsy.
Solution:   Use the pointer in tabpage_T.
This commit is contained in:
Bram Moolenaar
2019-05-26 18:48:13 +02:00
parent ec58384afa
commit 9c27b1c6d1
6 changed files with 17 additions and 49 deletions

View File

@@ -610,7 +610,7 @@ update_screen(int type_arg)
}
#ifdef FEAT_TEXT_PROP
// TODO: avoid redrawing everything when there is a popup window.
if (first_popupwin != NULL || first_tab_popupwin != NULL)
if (first_popupwin != NULL || curtab->tp_first_popupwin != NULL)
type = NOT_VALID;
#endif
@@ -1000,7 +1000,7 @@ update_popups(void)
// Reset all the VALID_POPUP flags.
for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
wp->w_valid &= ~VALID_POPUP;
for (wp = first_tab_popupwin; wp != NULL; wp = wp->w_next)
for (wp = curtab->tp_first_popupwin; wp != NULL; wp = wp->w_next)
wp->w_valid &= ~VALID_POPUP;
// TODO: don't redraw every popup every time.
@@ -1018,7 +1018,7 @@ update_popups(void)
lowest_zindex = wp->w_zindex;
lowest_wp = wp;
}
for (wp = first_tab_popupwin; wp != NULL; wp = wp->w_next)
for (wp = curtab->tp_first_popupwin; wp != NULL; wp = wp->w_next)
if ((wp->w_valid & VALID_POPUP) == 0
&& wp->w_zindex < lowest_zindex)
{