From 7c75be3651fd90d159d12c6d7871e0cc6e94a522 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pavel=20Jan=C3=ADk?= Date: Tue, 18 Dec 2001 16:16:14 +0000 Subject: [PATCH] (window_box_height): Do not return negative values. From Gerd Moellmann . --- src/ChangeLog | 3 +++ src/xdisp.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) 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); } -- 2.39.2