diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-06-08 17:15:51 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-06-08 17:15:51 +0200 |
commit | acc682bd7ca66b74b42de7a5fb5d3ef37897926f (patch) | |
tree | d8d517bd1f426b0e8bc5c3f824000969fb18b8f9 /src/popupwin.c | |
parent | 1748c7f77ea864c669b7e5cfb2be0c34ce45e36e (diff) |
patch 8.1.1496: popup window height is not recomputedv8.1.1496
Problem: Popup window height is not recomputed.
Solution: Recompute the height when needed.
Diffstat (limited to 'src/popupwin.c')
-rw-r--r-- | src/popupwin.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/popupwin.c b/src/popupwin.c index 13ba6391db..000bed9b70 100644 --- a/src/popupwin.c +++ b/src/popupwin.c @@ -541,8 +541,7 @@ popup_adjust_position(win_T *wp) 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; + 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,11 +565,13 @@ popup_adjust_position(win_T *wp) 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; } |