GNU bug report logs -
#37563
27.0.50; fit-frame-to-buffer does not account for line-spacing
Previous Next
Reported by: Ingo Lohmar <ingo.lohmar <at> posteo.net>
Date: Mon, 30 Sep 2019 19:34:01 UTC
Severity: normal
Found in version 27.0.50
Done: Ingo Lohmar <ingo.lohmar <at> posteo.net>
Bug is archived. No further changes may be made.
Full log
Message #26 received at 37563 <at> debbugs.gnu.org (full text, mbox):
> Agreed. But if I change 'fit-frame-to-buffer', then, for consistency,
> I have to at least change 'fit-window-to-buffer' too.
>
> > + (setq height (* (/ (+ height line-height -1) line-height)
> > + line-height)))
> [...]
> > And then char-height can be dropped.
>
> Right.
Hmm... Back to the roots, unfortunately.
When we are here, 'height' is the calculated height the window should
have in pixels. When we want to communicate this value to the window
manager and 'frame-resize-pixelwise' is nil, we have to transform this
value (which already includes the pixels needed for line spacing) to a
multiple of the canonical character height of the frame and not the
line height we calculated earlier. So using 'line-height' here is not
the TRT unless I'm missing something. WDYT?
martin
PS: My 'window-line-height' must be renamed to not clash with the
homonymous function in window.c. It will probably become something
like 'window-default-line-height' unless I manage to merge it into
'default-line-height' itself.
This bug report was last modified 5 years and 220 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.