Mercurial > emacs
comparison src/window.c @ 37270:9bf32a648127
(window_internal_height): Return 1 less if the
window has a header line.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Mon, 09 Apr 2001 12:35:37 +0000 |
parents | 126bac1a4495 |
children | 8381b1ef7f3a |
comparison
equal
deleted
inserted
replaced
37269:cdc3247d50f2 | 37270:9bf32a648127 |
---|---|
3854 w = NILP (w->next) ? 0 : XWINDOW (w->next); | 3854 w = NILP (w->next) ? 0 : XWINDOW (w->next); |
3855 } | 3855 } |
3856 } | 3856 } |
3857 | 3857 |
3858 | 3858 |
3859 /* Return number of lines of text (not counting mode line) in W. */ | 3859 /* Return number of lines of text (not counting mode lines) in W. */ |
3860 | 3860 |
3861 int | 3861 int |
3862 window_internal_height (w) | 3862 window_internal_height (w) |
3863 struct window *w; | 3863 struct window *w; |
3864 { | 3864 { |
3865 int ht = XFASTINT (w->height); | 3865 int ht = XFASTINT (w->height); |
3866 | 3866 |
3867 if (MINI_WINDOW_P (w)) | 3867 if (!MINI_WINDOW_P (w)) |
3868 return ht; | 3868 { |
3869 | 3869 if (!NILP (w->parent) |
3870 if (!NILP (w->parent) || !NILP (w->vchild) || !NILP (w->hchild) | 3870 || !NILP (w->vchild) |
3871 || !NILP (w->next) || !NILP (w->prev) | 3871 || !NILP (w->hchild) |
3872 || FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME (w)))) | 3872 || !NILP (w->next) |
3873 return ht - 1; | 3873 || !NILP (w->prev) |
3874 || WINDOW_WANTS_MODELINE_P (w)) | |
3875 --ht; | |
3876 | |
3877 if (WINDOW_WANTS_HEADER_LINE_P (w)) | |
3878 --ht; | |
3879 } | |
3874 | 3880 |
3875 return ht; | 3881 return ht; |
3876 } | 3882 } |
3877 | 3883 |
3878 | 3884 |