From f3ca3f9bf7981e5297e0feb74c58dccd5f4c2a1d Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Wed, 31 Oct 2001 10:12:09 +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 29b9577ec4d..c4e664dc849 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-31 Pavel Jan,Bm(Bk * keyboard.c (Freset_this_command_lengths): Doc fix. diff --git a/src/window.c b/src/window.c index 38f9d772e4e..764ffc04f04 100644 --- a/src/window.c +++ b/src/window.c @@ -3777,7 +3777,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