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

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

bug#55169: Can't combine window-min-height with window-height


From: Juri Linkov
Subject: bug#55169: Can't combine window-min-height with window-height
Date: Thu, 28 Apr 2022 20:58:18 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

As bug#33007 revealed, window-min-height doesn't prevent
from too narrow window height when using such call:

  (pop-to-buffer (generate-new-buffer "*edit string*")
                 '(display-buffer-below-selected
                   (window-min-height . 10)
                   (window-height . fit-window-to-buffer)))

Shouldn't the order of processing these parameters be rather like this:

1. first set window-height with fit-window-to-buffer;
2. then check if the constraint of window-min-height is fulfilled,
   and shrink too high window.

Then the caller could insert the initial string, and
'fit-window-to-buffer' will fit the window.  If the window height
is less than 10 lines, it will enlarge to 10 lines.  But in case of
too many lines, the window height should not be more than
half of the original window.





reply via email to

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