changeset 42137:2eeaeb542d76

(window_box_height): Do not return negative values. From Gerd Moellmann <gerd@gnu.org>.
author Pavel Janík <Pavel@Janik.cz>
date Tue, 18 Dec 2001 16:14:13 +0000
parents 5b63c25571a8
children 184ca0b7cd7b
files src/xdisp.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Tue Dec 18 16:04:56 2001 +0000
+++ b/src/xdisp.c	Tue Dec 18 16:14:13 2001 +0000
@@ -910,7 +910,9 @@
 	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);
 }