comparison src/eval.c @ 16796:5f98d80d116a v8.1.1400

patch 8.1.1400: using global pointer for tab-local popups is clumsy commit https://github.com/vim/vim/commit/9c27b1c6d140ca824a78654c1cb70a43a69b4ec6 Author: Bram Moolenaar <Bram@vim.org> Date: Sun May 26 18:48:13 2019 +0200 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.
author Bram Moolenaar <Bram@vim.org>
date Sun, 26 May 2019 19:00:04 +0200
parents eda4d65f232c
children ce04ebdf26b8
comparison
equal deleted inserted replaced
16795:39a8595200a6 16796:5f98d80d116a
5587 NULL, NULL); 5587 NULL, NULL);
5588 #ifdef FEAT_TEXT_PROP 5588 #ifdef FEAT_TEXT_PROP
5589 for (wp = first_popupwin; wp != NULL; wp = wp->w_next) 5589 for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
5590 abort = abort || set_ref_in_item(&wp->w_winvar.di_tv, copyID, 5590 abort = abort || set_ref_in_item(&wp->w_winvar.di_tv, copyID,
5591 NULL, NULL); 5591 NULL, NULL);
5592 for (wp = first_tab_popupwin; wp != NULL; wp = wp->w_next)
5593 abort = abort || set_ref_in_item(&wp->w_winvar.di_tv, copyID,
5594 NULL, NULL);
5595 FOR_ALL_TABPAGES(tp) 5592 FOR_ALL_TABPAGES(tp)
5596 if (tp != curtab) 5593 for (wp = tp->tp_first_popupwin; wp != NULL; wp = wp->w_next)
5597 for (wp = tp->tp_first_popupwin; wp != NULL; wp = wp->w_next)
5598 abort = abort || set_ref_in_item(&wp->w_winvar.di_tv, copyID, 5594 abort = abort || set_ref_in_item(&wp->w_winvar.di_tv, copyID,
5599 NULL, NULL); 5595 NULL, NULL);
5600 #endif 5596 #endif
5601 5597
5602 /* tabpage-local variables */ 5598 /* tabpage-local variables */
8814 break; 8810 break;
8815 } 8811 }
8816 if (nr >= LOWEST_WIN_ID) 8812 if (nr >= LOWEST_WIN_ID)
8817 { 8813 {
8818 #ifdef FEAT_TEXT_PROP 8814 #ifdef FEAT_TEXT_PROP
8819 // popup windows are in a separate list 8815 // check tab-local popup windows
8820 for (wp = (tp == NULL || tp == curtab) 8816 for (wp = tp->tp_first_popupwin; wp != NULL; wp = wp->w_next)
8821 ? first_tab_popupwin : tp->tp_first_popupwin;
8822 wp != NULL; wp = wp->w_next)
8823 if (wp->w_id == nr) 8817 if (wp->w_id == nr)
8824 return wp; 8818 return wp;
8819 // check global popup windows
8825 for (wp = first_popupwin; wp != NULL; wp = wp->w_next) 8820 for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
8826 if (wp->w_id == nr) 8821 if (wp->w_id == nr)
8827 return wp; 8822 return wp;
8828 #endif 8823 #endif
8829 return NULL; 8824 return NULL;