emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: window-body-height vs window-text-height


From: Miles Bader
Subject: Re: window-body-height vs window-text-height
Date: Wed, 29 Oct 2008 00:22:08 +0900

Stefan Monnier <address@hidden> writes:
>> If there is a partial line at the bottom of the window,
>> window-text-height rounds down, and window-body-height rounds up.
>> If there are no fractional lines, both return the same value.
>
>> [In both cases, the number of lines assumes the default face -- neither
>> measures what's actually displayed.]
>
> Now I'm confused.  IIUC window sizes can only be multiples of the
> default face size, so the number of lines (assuming the default face)
> can only be a whole number and can never include partial lines, no?

But the numbers returned by those functions don't include the
mode-line/header-line -- and AFAIK, it's only true that the _total_
window height (including the mode-line/header-line) must be a multiple
of the default face height.  If you use e.g. a mode-line which is taller
than a normal text line, you'll get a fractional last line in the text
display area.

-Miles

-- 
Marriage, n. The state or condition of a community consisting of a master, a
mistress and two slaves, making in all, two.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]