From: Pavel Janík Date: Tue, 18 Dec 2001 16:16:14 +0000 (+0000) Subject: (window_box_height): Do not return negative values. X-Git-Tag: ttn-vms-21-2-B4~17635 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7c75be3651fd90d159d12c6d7871e0cc6e94a522;p=emacs.git (window_box_height): Do not return negative values. From Gerd Moellmann . --- diff --git a/src/ChangeLog b/src/ChangeLog index cfb151d0f99..e001f967382 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2001-12-18 Pavel Jan,Bm(Bk + * xdisp.c (window_box_height): Do not return negative values. + From Gerd Moellmann . + * keyboard.c (head_table): Add missing braces around initializer. * term.c (keys): Likewise. diff --git a/src/xdisp.c b/src/xdisp.c index b2a5a1d08a5..1dd5f0fa985 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -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); }