Patch 8.1.1496
Problem: Popup window height is not recomputed.
Solution: Recompute the height when needed.
Files: src/popupwin.c, src/testdir/dumps/Test_popupwin_06.dump
*** ../vim-8.1.1495/src/popupwin.c 2019-06-08 16:01:10.643493653 +0200
--- src/popupwin.c 2019-06-08 17:04:26.364556652 +0200
***************
*** 541,548 ****
wp->w_wincol = wp->w_wantcol - (wp->w_width + extra_width);
}
! if (wp->w_height <= 1)
! wp->w_height = wp->w_buffer->b_ml.ml_line_count + wrapped;
if (wp->w_minheight > 0 && wp->w_height < wp->w_minheight)
wp->w_height = wp->w_minheight;
if (wp->w_maxheight > 0 && wp->w_height > wp->w_maxheight)
--- 541,547 ----
wp->w_wincol = wp->w_wantcol - (wp->w_width + extra_width);
}
! wp->w_height = wp->w_buffer->b_ml.ml_line_count + wrapped;
if (wp->w_minheight > 0 && wp->w_height < wp->w_minheight)
wp->w_height = wp->w_minheight;
if (wp->w_maxheight > 0 && wp->w_height > wp->w_maxheight)
***************
*** 566,576 ****
--- 565,577 ----
wp->w_popup_last_changedtick = CHANGEDTICK(wp->w_buffer);
// Need to update popup_mask if the position or size changed.
+ // And redraw windows that were behind the popup.
if (org_winrow != wp->w_winrow
|| org_wincol != wp->w_wincol
|| org_width != wp->w_width
|| org_height != wp->w_height)
{
+ // TODO: redraw only windows that were below the popup.
redraw_all_later(NOT_VALID);
popup_mask_refresh = TRUE;
}
*** ../vim-8.1.1495/src/testdir/dumps/Test_popupwin_06.dump 2019-05-30 00:11:48.704086357 +0200
--- src/testdir/dumps/Test_popupwin_06.dump 2019-06-08 17:11:59.537392708 +0200
***************
*** 4,10 ****
|~| @6|o+0#0000001#ffd7ff255|t|h|e|r| |t|a|b| @15| +0#4040ff13#ffffff0@41
|~| @6|a+0#0000001#ffd7ff255| |c+0#ff404010&|o|m@1|e|n|t| +0#0000001&|l|i|n|e| @10| +0#4040ff13#ffffff0@41
|~| @6|t+0#0000001#ffd7ff255|h|i|s| |l|i|n|e| |w|i|l@1| |n|o|t| |f|i|t| |h|e| +0#4040ff13#ffffff0@41
! |~| @73
|~| @73
|~| @73
|:+0#0000000&|r|e|d|r|a|w| @49|0|,|0|-|1| @8|A|l@1|
--- 4,10 ----
|~| @6|o+0#0000001#ffd7ff255|t|h|e|r| |t|a|b| @15| +0#4040ff13#ffffff0@41
|~| @6|a+0#0000001#ffd7ff255| |c+0#ff404010&|o|m@1|e|n|t| +0#0000001&|l|i|n|e| @10| +0#4040ff13#ffffff0@41
|~| @6|t+0#0000001#ffd7ff255|h|i|s| |l|i|n|e| |w|i|l@1| |n|o|t| |f|i|t| |h|e| +0#4040ff13#ffffff0@41
! |~| @6|r+0#0000001#ffd7ff255|e| @22| +0#4040ff13#ffffff0@41
|~| @73
|~| @73
|:+0#0000000&|r|e|d|r|a|w| @49|0|,|0|-|1| @8|A|l@1|
*** ../vim-8.1.1495/src/version.c 2019-06-08 16:55:12.143336473 +0200
--- src/version.c 2019-06-08 17:15:33.235676891 +0200
***************
*** 769,770 ****
--- 769,772 ----
{ /* Add new patch number below this line */
+ /**/
+ 1496,
/**/
--
~
~
~
".signature" 4 lines, 50 characters written
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language --
http://www.Zimbu.org ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///