From: Stefan Kangas <stefan@marxist.se>
To: Eli Zaretskii <eliz@gnu.org>
Cc: William Carroll <wpcarro@gmail.com>, 43105@debbugs.gnu.org
Subject: bug#43105: (window-body-height) Reporting Too Large of Value
Date: Tue, 1 Sep 2020 07:29:58 -0700 [thread overview]
Message-ID: <CADwFkmkngpzBp45NifoA9g+mGN0u9aoDAGaw1XP6oKhAxcWjYA@mail.gmail.com> (raw)
In-Reply-To: <83pn79xpr4.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 29 Aug 2020 21:37:19 +0300")
tags 43105 notabug
close 43105
thanks
Eli Zaretskii <eliz@gnu.org> writes:
>> From: William Carroll <wpcarro@gmail.com>
>> Date: Sat, 29 Aug 2020 18:10:17 +0100
>>
>> I believe `(window-body-height)` does not account for non-zero `line-spacing` amounts. This causes
>> `(window-body-height)` in graphical Emacs to report values larger than the number of lines of text that can
>> render on the screen.
>
> window-body-height reports the height of the window's body in units of
> canonical character height:
>
> If PIXELWISE is nil, return the largest integer smaller than WINDOW’s
> pixel height divided by the character height of WINDOW’s frame.
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> Thus, window-body-height is by design insensitive to factors like
> non-default fonts, line-spacing, etc.
>
>> This affects programs like vterm.el and others that rely on `(window-body-height)`. In my particular case,
>> when I ran `man` and `less` from vterm.el, it rendered things above the top "fold" of the screen.
>
> Then the bug is in vterm.el: it should use other APIs to get the
> dimensions in terms of actual number of lines in the window. The
> function window-body-height works as intended.
I'm therefore closing this bug report.
prev parent reply other threads:[~2020-09-01 14:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-29 17:10 bug#43105: (window-body-height) Reporting Too Large of Value William Carroll
2020-08-29 18:37 ` Eli Zaretskii
2020-09-01 14:29 ` Stefan Kangas [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CADwFkmkngpzBp45NifoA9g+mGN0u9aoDAGaw1XP6oKhAxcWjYA@mail.gmail.com \
--to=stefan@marxist.se \
--cc=43105@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=wpcarro@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).