diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-05-26 18:48:13 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-05-26 18:48:13 +0200 |
commit | 9c27b1c6d140ca824a78654c1cb70a43a69b4ec6 (patch) | |
tree | 57990eef2c7d0c934f30772bb7fe74e845636a25 /src/eval.c | |
parent | ec58384afa0dc1678afd7b8d19b4645ac2f73f42 (diff) | |
download | vim-git-9c27b1c6d140ca824a78654c1cb70a43a69b4ec6.tar.gz |
patch 8.1.1400: using global pointer for tab-local popups is clumsyv8.1.1400
Problem: Using global pointer for tab-local popups is clumsy.
Solution: Use the pointer in tabpage_T.
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/eval.c b/src/eval.c index fb417c8b4..7fbd7702d 100644 --- a/src/eval.c +++ b/src/eval.c @@ -5589,12 +5589,8 @@ garbage_collect(int testing) for (wp = first_popupwin; wp != NULL; wp = wp->w_next) abort = abort || set_ref_in_item(&wp->w_winvar.di_tv, copyID, NULL, NULL); - for (wp = first_tab_popupwin; wp != NULL; wp = wp->w_next) - abort = abort || set_ref_in_item(&wp->w_winvar.di_tv, copyID, - NULL, NULL); FOR_ALL_TABPAGES(tp) - if (tp != curtab) - for (wp = tp->tp_first_popupwin; wp != NULL; wp = wp->w_next) + for (wp = tp->tp_first_popupwin; wp != NULL; wp = wp->w_next) abort = abort || set_ref_in_item(&wp->w_winvar.di_tv, copyID, NULL, NULL); #endif @@ -8816,12 +8812,11 @@ find_win_by_nr( if (nr >= LOWEST_WIN_ID) { #ifdef FEAT_TEXT_PROP - // popup windows are in a separate list - for (wp = (tp == NULL || tp == curtab) - ? first_tab_popupwin : tp->tp_first_popupwin; - wp != NULL; wp = wp->w_next) + // check tab-local popup windows + for (wp = tp->tp_first_popupwin; wp != NULL; wp = wp->w_next) if (wp->w_id == nr) return wp; + // check global popup windows for (wp = first_popupwin; wp != NULL; wp = wp->w_next) if (wp->w_id == nr) return wp; |