unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* window-height but taking the face into account
@ 2024-03-25 16:13 mbork
  2024-03-25 16:57 ` Eli Zaretskii
  2024-03-26 13:48 ` Stefan Monnier via Users list for the GNU Emacs text editor
  0 siblings, 2 replies; 3+ messages in thread
From: mbork @ 2024-03-25 16:13 UTC (permalink / raw)
  To: Help Gnu Emacs mailing list

Hi all,

it seems that `window-height' returns the same number irrespective of
the font size I use (set up with `text-scale-adjust').  Is it possible
to get the actual number of lines visible on the screen?  And yes, I am
aware that when different parts have different font sizes, it can get
messy etc., but I don't care about such issues -- I just want to know
how many lines are actually visible in the current window.

I think I could use something like
(floor (window-pixel-height) (window-default-line-height)).
Is there a better way?

TIA,

-- 
Marcin Borkowski
https://mbork.pl
https://crimsonelevendelightpetrichor.net/



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-03-26 13:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-25 16:13 window-height but taking the face into account mbork
2024-03-25 16:57 ` Eli Zaretskii
2024-03-26 13:48 ` Stefan Monnier via Users list for the GNU Emacs text editor

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).