diff options
| author | Gerd Moellmann | 2001-04-09 12:35:37 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-04-09 12:35:37 +0000 |
| commit | e9c195b1a4ea82fa3d9a018ac4188aa7f7621c3a (patch) | |
| tree | d411a0cf46da0d61ab281a0a9c2318e8819427b7 /src | |
| parent | ceeb3d7db5c33884003f280ddfaa1c50a70cc7ad (diff) | |
| download | emacs-e9c195b1a4ea82fa3d9a018ac4188aa7f7621c3a.tar.gz emacs-e9c195b1a4ea82fa3d9a018ac4188aa7f7621c3a.zip | |
(window_internal_height): Return 1 less if the
window has a header line.
Diffstat (limited to 'src')
| -rw-r--r-- | src/window.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/window.c b/src/window.c index cfedacaee83..d6538976b68 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -3856,7 +3856,7 @@ mark_window_cursors_off (w) | |||
| 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) |
| @@ -3864,13 +3864,19 @@ window_internal_height (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 | } |