aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/window.c b/src/window.c
index 1e3d70fd88d..de1e2d2c068 100644
--- a/src/window.c
+++ b/src/window.c
@@ -4582,24 +4582,24 @@ grow_mini_window (struct window *w, int delta, bool pixelwise)
4582 4582
4583 if (pixelwise) 4583 if (pixelwise)
4584 { 4584 {
4585 pixel_height = max (min (-XINT (height), INT_MAX - w->pixel_height), 4585 pixel_height = min (-XINT (height), INT_MAX - w->pixel_height);
4586 FRAME_LINE_HEIGHT (f));
4587 line_height = pixel_height / FRAME_LINE_HEIGHT (f); 4586 line_height = pixel_height / FRAME_LINE_HEIGHT (f);
4588 } 4587 }
4589 else 4588 else
4590 { 4589 {
4591 line_height = max (min (-XINT (height), 4590 line_height = min (-XINT (height),
4592 ((INT_MAX - w->pixel_height) 4591 ((INT_MAX - w->pixel_height)
4593 / FRAME_LINE_HEIGHT (f))), 4592 / FRAME_LINE_HEIGHT (f)));
4594 1);
4595 pixel_height = line_height * FRAME_LINE_HEIGHT (f); 4593 pixel_height = line_height * FRAME_LINE_HEIGHT (f);
4596 } 4594 }
4597 4595
4598 /* Grow the mini-window. */ 4596 /* Grow the mini-window. */
4599 w->pixel_top = r->pixel_top + r->pixel_height; 4597 w->pixel_top = r->pixel_top + r->pixel_height;
4600 w->top_line = r->top_line + r->total_lines; 4598 w->top_line = r->top_line + r->total_lines;
4601 w->pixel_height += pixel_height; 4599 /* Make sure the mini-window has always at least one line. */
4602 w->total_lines += line_height; 4600 w->pixel_height = max (w->pixel_height + pixel_height,
4601 FRAME_LINE_HEIGHT (f));
4602 w->total_lines = max (w->total_lines + line_height, 1);
4603 4603
4604 /* Enforce full redisplay of the frame. */ 4604 /* Enforce full redisplay of the frame. */
4605 /* FIXME: Shouldn't window--resize-root-window-vertically do it? */ 4605 /* FIXME: Shouldn't window--resize-root-window-vertically do it? */