From eafa319686563cbfb93ba725bb1d5d7a5e8c1a3b Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Wed, 31 Oct 2001 10:06:35 +0000 Subject: [PATCH] (grow_mini_window): Handle case that the root window is already smaller than the nominal mininum height. --- src/ChangeLog | 5 +++++ src/window.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index cf8cc35a5fa..cb08a806bb5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2001-10-31 Gerd Moellmann + + * window.c (grow_mini_window): Handle case that the root + window is already smaller than the nominal mininum height. + 2001-10-30 Stefan Monnier * emacs.c (main): Don't call keys_of_macros any more. diff --git a/src/window.c b/src/window.c index 0c095c1a826..5f122976d9b 100644 --- a/src/window.c +++ b/src/window.c @@ -3751,7 +3751,9 @@ grow_mini_window (w, delta) { int min_height = window_min_size (root, 0, 0, 0); if (XFASTINT (root->height) - delta < min_height) - delta = XFASTINT (root->height) - min_height; + /* Note that the roor window may already be smaller than + min_height. */ + delta = max (0, XFASTINT (root->height) - min_height); } if (delta) -- 2.39.2