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/window.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/window.c')
-rw-r--r-- | src/window.c | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/src/window.c b/src/window.c index ffff75647..bc8dac0b4 100644 --- a/src/window.c +++ b/src/window.c @@ -1371,7 +1371,7 @@ win_valid_popup(win_T *win UNUSED) for (wp = first_popupwin; wp != NULL; wp = wp->w_next) if (wp == win) return TRUE; - 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 == win) return TRUE; #endif @@ -3673,13 +3673,8 @@ free_tabpage(tabpage_T *tp) { win_T *wp; - for (;;) - { - wp = tp == curtab ? first_tab_popupwin : tp->tp_first_popupwin; - if (wp == NULL) - break; - popup_close_tabpage(tp, wp->w_id); - } + while (tp->tp_first_popupwin != NULL) + popup_close_tabpage(tp, tp->tp_first_popupwin->w_id); } #endif for (idx = 0; idx < SNAP_COUNT; ++idx) @@ -3973,10 +3968,6 @@ leave_tabpage( tp->tp_prevwin = prevwin; tp->tp_firstwin = firstwin; tp->tp_lastwin = lastwin; -#ifdef FEAT_TEXT_PROP - tp->tp_first_popupwin = first_tab_popupwin; - first_tab_popupwin = NULL; -#endif tp->tp_old_Rows = Rows; tp->tp_old_Columns = Columns; firstwin = NULL; @@ -4004,9 +3995,6 @@ enter_tabpage( firstwin = tp->tp_firstwin; lastwin = tp->tp_lastwin; topframe = tp->tp_topframe; -#ifdef FEAT_TEXT_PROP - first_tab_popupwin = tp->tp_first_popupwin; -#endif /* We would like doing the TabEnter event first, but we don't have a * valid current window yet, which may break some commands. @@ -6513,15 +6501,9 @@ switch_win( { curtab->tp_firstwin = firstwin; curtab->tp_lastwin = lastwin; -#ifdef FEAT_TEXT_PROP - curtab->tp_first_popupwin = first_tab_popupwin ; -#endif curtab = tp; firstwin = curtab->tp_firstwin; lastwin = curtab->tp_lastwin; -#ifdef FEAT_TEXT_PROP - first_tab_popupwin = curtab->tp_first_popupwin; -#endif } else goto_tabpage_tp(tp, FALSE, FALSE); @@ -6550,15 +6532,9 @@ restore_win( { curtab->tp_firstwin = firstwin; curtab->tp_lastwin = lastwin; -#ifdef FEAT_TEXT_PROP - curtab->tp_first_popupwin = first_tab_popupwin ; -#endif curtab = save_curtab; firstwin = curtab->tp_firstwin; lastwin = curtab->tp_lastwin; -#ifdef FEAT_TEXT_PROP - first_tab_popupwin = curtab->tp_first_popupwin; -#endif } else goto_tabpage_tp(save_curtab, FALSE, FALSE); |