]> code.delx.au - gnu-emacs/commitdiff
(WINDOW_WANTS_MODELINE_P): Check window height > 1.
authorRichard M. Stallman <rms@gnu.org>
Fri, 18 Jan 2002 18:25:52 +0000 (18:25 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 18 Jan 2002 18:25:52 +0000 (18:25 +0000)
(WINDOW_WANTS_HEADER_LINE_P): Check window height provides room.

src/dispextern.h

index 99ee136818203213eea2d0bcf30fe378a8a4554d..74726f02559a43f4e84b9437d00324eaf8ab2e5f 100644 (file)
@@ -1112,20 +1112,22 @@ extern struct glyph_row scratch_glyph_row;
 /* 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))
 
 \f     
 /***********************************************************************