]> git.eshelyaron.com Git - emacs.git/commitdiff
(window_box_height): Do not return negative values.
authorPavel Janík <Pavel@Janik.cz>
Tue, 18 Dec 2001 16:16:14 +0000 (16:16 +0000)
committerPavel Janík <Pavel@Janik.cz>
Tue, 18 Dec 2001 16:16:14 +0000 (16:16 +0000)
From Gerd Moellmann <gerd@gnu.org>.

src/ChangeLog
src/xdisp.c

index cfb151d0f99897f37fdd45aff8c293150c997dea..e001f967382852d6e022262a831a6781f97b43e1 100644 (file)
@@ -1,5 +1,8 @@
 2001-12-18  Pavel Jan\e,Bm\e(Bk  <Pavel@Janik.cz>
 
+       * xdisp.c (window_box_height): Do not return negative values.
+       From Gerd Moellmann <gerd@gnu.org>.
+
        * keyboard.c (head_table): Add missing braces around initializer.
 
        * term.c (keys): Likewise.
index b2a5a1d08a5c6486d32723c6a8bd7cd292899deb..1dd5f0fa9854613fa94b887f721f3b5c5d12a530 100644 (file)
@@ -910,7 +910,9 @@ window_box_height (w)
        height -= estimate_mode_line_height (f, HEADER_LINE_FACE_ID);
     }
 
-  return height;
+  /* With a very small font and a mode-line that's taller than
+     default, we might end up with a negative height.  */
+  return max (0, height);
 }