bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#37563: 27.0.50; fit-frame-to-buffer does not account for line-spacin


From: martin rudalics
Subject: bug#37563: 27.0.50; fit-frame-to-buffer does not account for line-spacing
Date: Sat, 5 Oct 2019 10:41:11 +0200

> Okay, then I truly don't know how to write that succinctly.  I suggest
> to keep using the char-height (and the `frame-resize-pixelwise'
> docstring) for the time being, that is, not change the code in the last
> part of the function.

If I don't use 'frame-char-height' here, any subsequent resize
requests for that frame (including resizing the frame by dragging its
boder with the mouse) might use the line height value.  In general,
this is certainly not TRT, for example, when another buffer gets
displayed in that frame's window.  That's also why I'm still reluctant
to use the line height concept more pervasively.

The particular problem could be resolved by adding a
'resize-pixelwise' frame parameter whose value, when set, would
override that of 'frame-resize-pixelwise'.  Provided your frame is
in some sense private to 'company-posframe'.

> Personally, I will simple set `frame-resize-pixelwise' to t.

I don't think, however, that this problem is grave enough to warrant a
general recommendation.  Adding all sorts of window and frame
decorations to the value returned by 'window-text-pixel-size' will
often add some slack whitespace when 'frame-resize-pixelwise' is nil,
regardless of whether we round by character or line height.

martin





reply via email to

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