[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: |
Mon, 7 Oct 2019 11:25:52 +0200 |
I now came up with a fix for 'fit-window-to-buffer' too which had some
strange misbehavior with different size restricting arguments when the
window's text size did not change. See attached diffs and Change Log
below.
> I think I understand better now, I was hampered by some weird debugging
> artifacts in my current setup. With the default
> `frame-resize-pixelwise' of nil, and the otherwise bug-fixed code,
> nothing is cut off, but there is some slack whitespace, indeed.
I suppose that part of that whitespace comes from the fact that with
'line-spacing' greater zero, 'window-text-pixel-size' includes the
space below the last line of its text. It would be nice to get rid of
that but ISTR that a line's text may now get centered within the space
reserved for it. So I cannot just remove the entire line space of one
line from the return value but probably only half of the line spacing
value. How would I know the right value?
martin
Fixes for fitting windows and frames to their buffers (Bug#37563)
* lisp/window.el (window-default-font-height)
(window-default-line-height): New functions.
(fit-frame-to-buffer): Interpret values of MAX-HEIGHT and
MIN-HEIGHT arguments in terms of WINDOW's default line height
(Bug#37563).
(fit-window-to-buffer): Obey size restricting arguments even
when size of WINDOW's text does not change. Do not
temporarily select WINDOW and perform height/width related
calculations if and only if WINDOW is accordingly combined.
Interpret values of MAX-HEIGHT and MIN-HEIGHT arguments in
terms of WINDOW's default line height.
fit-to-buffer.diffs
Description: Text document
- bug#37563: 27.0.50; fit-frame-to-buffer does not account for line-spacing, martin rudalics, 2019/10/01
- Message not available
- bug#37563: 27.0.50; fit-frame-to-buffer does not account for line-spacing, martin rudalics, 2019/10/01
- bug#37563: 27.0.50; fit-frame-to-buffer does not account for line-spacing, Ingo Lohmar, 2019/10/01
- bug#37563: 27.0.50; fit-frame-to-buffer does not account for line-spacing, martin rudalics, 2019/10/02
- bug#37563: 27.0.50; fit-frame-to-buffer does not account for line-spacing, martin rudalics, 2019/10/03
- bug#37563: 27.0.50; fit-frame-to-buffer does not account for line-spacing, Ingo Lohmar, 2019/10/03
- bug#37563: 27.0.50; fit-frame-to-buffer does not account for line-spacing, martin rudalics, 2019/10/03
- bug#37563: 27.0.50; fit-frame-to-buffer does not account for line-spacing, Ingo Lohmar, 2019/10/03
- bug#37563: 27.0.50; fit-frame-to-buffer does not account for line-spacing, martin rudalics, 2019/10/05
- bug#37563: 27.0.50; fit-frame-to-buffer does not account for line-spacing, Ingo Lohmar, 2019/10/05
- bug#37563: 27.0.50; fit-frame-to-buffer does not account for line-spacing,
martin rudalics <=
- bug#37563: 27.0.50; fit-frame-to-buffer does not account for line-spacing, Ingo Lohmar, 2019/10/07
- bug#37563: 27.0.50; fit-frame-to-buffer does not account for line-spacing, martin rudalics, 2019/10/08
- bug#37563: 27.0.50; fit-frame-to-buffer does not account for line-spacing, martin rudalics, 2019/10/11
- bug#37563: 27.0.50; fit-frame-to-buffer does not account for line-spacing, Ingo Lohmar, 2019/10/11
- bug#37563: 27.0.50; fit-frame-to-buffer does not account for line-spacing, Ingo Lohmar, 2019/10/03
- bug#37563: 27.0.50; fit-frame-to-buffer does not account for line-spacing, Robert Pluim, 2019/10/03
- bug#37563: 27.0.50; fit-frame-to-buffer does not account for line-spacing, Eli Zaretskii, 2019/10/03
- bug#37563: 27.0.50; fit-frame-to-buffer does not account for line-spacing, martin rudalics, 2019/10/03
- bug#37563: 27.0.50; fit-frame-to-buffer does not account for line-spacing, Ingo Lohmar, 2019/10/03