changeset 42828:48dd83c34137

(WINDOW_WANTS_MODELINE_P): Check window height > 1. (WINDOW_WANTS_HEADER_LINE_P): Check window height provides room.
author Richard M. Stallman <rms@gnu.org>
date Fri, 18 Jan 2002 18:25:52 +0000
parents 3616610fabd8
children 07bd6e693cb6
files src/dispextern.h
diffstat 1 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/dispextern.h	Fri Jan 18 11:44:40 2002 +0000
+++ b/src/dispextern.h	Fri Jan 18 18:25:52 2002 +0000
@@ -1112,20 +1112,22 @@
 /* Value is non-zero if window W wants a mode line.  */
 
 #define WINDOW_WANTS_MODELINE_P(W)					\
-     (!MINI_WINDOW_P (W)						\
+     (!MINI_WINDOW_P ((W))						\
       && !(W)->pseudo_window_p						\
-      && FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME (W)))		\
+      && FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W))))		\
       && BUFFERP ((W)->buffer)						\
-      && !NILP (XBUFFER ((W)->buffer)->mode_line_format))
+      && !NILP (XBUFFER ((W)->buffer)->mode_line_format)		\
+      && (W)->height > 1)
 
 /* Value is non-zero if window W wants a header line.  */
 
 #define WINDOW_WANTS_HEADER_LINE_P(W)					\
-     (!MINI_WINDOW_P (W)						\
+     (!MINI_WINDOW_P ((W))						\
       && !(W)->pseudo_window_p						\
-      && FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME (W)))		\
+      && FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W))))		\
       && BUFFERP ((W)->buffer)						\
-      && !NILP (XBUFFER ((W)->buffer)->header_line_format))
+      && !NILP (XBUFFER ((W)->buffer)->header_line_format)		\
+      && (W)->height > 1 + !NILP (XBUFFER ((W)->buffer)->mode_line_format))
 
      
 /***********************************************************************