aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorEli Zaretskii2019-12-30 17:53:52 +0200
committerEli Zaretskii2019-12-30 17:53:52 +0200
commit450633f85ae336e8a23241ec3ca5de5d8de8dcdd (patch)
tree810290189430ac7759a98044adf8136beb58cda5 /src/window.c
parent219d47893aef0da1dc42f0c5445df68a2abf480a (diff)
downloademacs-450633f85ae336e8a23241ec3ca5de5d8de8dcdd.tar.gz
emacs-450633f85ae336e8a23241ec3ca5de5d8de8dcdd.zip
Fix mini-window resizing under resize-mini-windows = t
* src/window.c (grow_mini_window): Fix resizing of mini-window when the echo area is cleared, and the caller asks for the mini-window to have zero lines. (Bug#38791)
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)
5229{ 5229{
5230 struct frame *f = XFRAME (w->frame); 5230 struct frame *f = XFRAME (w->frame);
5231 int old_height = window_body_height (w, true); 5231 int old_height = window_body_height (w, true);
5232 int min_height = FRAME_LINE_HEIGHT (f);
5232 5233
5233 eassert (MINI_WINDOW_P (w)); 5234 eassert (MINI_WINDOW_P (w));
5234 5235
5235 if ((delta != 0) && (old_height + delta >= FRAME_LINE_HEIGHT (f))) 5236 /* Never shrink mini-window to less than its minimum height. */
5237 if (old_height + delta < min_height)
5238 delta = old_height > min_height ? min_height - old_height : 0;
5239
5240 if (delta != 0)
5236 { 5241 {
5237 Lisp_Object root = FRAME_ROOT_WINDOW (f); 5242 Lisp_Object root = FRAME_ROOT_WINDOW (f);
5238 struct window *r = XWINDOW (root); 5243 struct window *r = XWINDOW (root);