summaryrefslogtreecommitdiff
path: root/src/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/window.c b/src/window.c
index c52a8ca2855..1962e07f8d0 100644
--- a/src/window.c
+++ b/src/window.c
@@ -5229,10 +5229,15 @@ grow_mini_window (struct window *w, int delta)
{
struct frame *f = XFRAME (w->frame);
int old_height = window_body_height (w, true);
+ int min_height = FRAME_LINE_HEIGHT (f);
eassert (MINI_WINDOW_P (w));
- if ((delta != 0) && (old_height + delta >= FRAME_LINE_HEIGHT (f)))
+ /* Never shrink mini-window to less than its minimum height. */
+ if (old_height + delta < min_height)
+ delta = old_height > min_height ? min_height - old_height : 0;
+
+ if (delta != 0)
{
Lisp_Object root = FRAME_ROOT_WINDOW (f);
struct window *r = XWINDOW (root);