(grow_mini_window): Handle case that the root
authorGerd Moellmann <gerd@gnu.org>
Wed, 31 Oct 2001 10:06:35 +0000 (10:06 +0000)
committerGerd Moellmann <gerd@gnu.org>
Wed, 31 Oct 2001 10:06:35 +0000 (10:06 +0000)
window is already smaller than the nominal mininum height.

src/ChangeLog
src/window.c

index cf8cc35..cb08a80 100644 (file)
@@ -1,3 +1,8 @@
+2001-10-31  Gerd Moellmann  <gerd@gnu.org>
+
+       * window.c (grow_mini_window): Handle case that the root
+       window is already smaller than the nominal mininum height.
+
 2001-10-30  Stefan Monnier  <monnier@cs.yale.edu>
 
        * emacs.c (main): Don't call keys_of_macros any more.
index 0c095c1..5f12297 100644 (file)
@@ -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)