Skip to content

Commit 8caaf82

Browse files
committed
patch 8.1.1442: popup windows not considered when the Vim window is resized
Problem: Popup windows not considered when the Vim window is resized. (Ben Jackson) Solution: Reallocate the w_lines structure. (closes #4467)
1 parent bf0eff0 commit 8caaf82

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

src/screen.c

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8892,6 +8892,15 @@ screenalloc(int doclear)
88928892
win_free_lsize(wp);
88938893
if (aucmd_win != NULL)
88948894
win_free_lsize(aucmd_win);
8895+
#ifdef FEAT_TEXT_PROP
8896+
// global popup windows
8897+
for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
8898+
win_free_lsize(wp);
8899+
// tab-local popup windows
8900+
FOR_ALL_TABPAGES(tp)
8901+
for (wp = tp->tp_first_popupwin; wp != NULL; wp = wp->w_next)
8902+
win_free_lsize(wp);
8903+
#endif
88958904

88968905
new_ScreenLines = LALLOC_MULT(schar_T, (Rows + 1) * Columns);
88978906
vim_memset(new_ScreenLinesC, 0, sizeof(u8char_T *) * MAX_MCO);
@@ -8920,6 +8929,24 @@ screenalloc(int doclear)
89208929
if (aucmd_win != NULL && aucmd_win->w_lines == NULL
89218930
&& win_alloc_lines(aucmd_win) == FAIL)
89228931
outofmem = TRUE;
8932+
#ifdef FEAT_TEXT_PROP
8933+
// global popup windows
8934+
for (wp = first_popupwin; wp != NULL; wp = wp->w_next)
8935+
if (win_alloc_lines(wp) == FAIL)
8936+
{
8937+
outofmem = TRUE;
8938+
goto give_up;
8939+
}
8940+
// tab-local popup windows
8941+
FOR_ALL_TABPAGES(tp)
8942+
for (wp = tp->tp_first_popupwin; wp != NULL; wp = wp->w_next)
8943+
if (win_alloc_lines(wp) == FAIL)
8944+
{
8945+
outofmem = TRUE;
8946+
goto give_up;
8947+
}
8948+
#endif
8949+
89238950
give_up:
89248951

89258952
for (i = 0; i < p_mco; ++i)

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -767,6 +767,8 @@ static char *(features[]) =
767767

768768
static int included_patches[] =
769769
{ /* Add new patch number below this line */
770+
/**/
771+
1442,
770772
/**/
771773
1441,
772774
/**/

0 commit comments

Comments
 (0)