[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: resize_mini_window question
From: |
Stefan Monnier |
Subject: |
Re: resize_mini_window question |
Date: |
Fri, 18 Sep 2020 11:30:58 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> I see 3 possible clean solutions:
>
> 1) Modify resize_mini_window to use the minibuffer's font size to
> calculate the height when Vmax_mini_window_height is an int. (don't know
> if it is possible to access the minibuffer font size from there or if
> this could produce some undesired side effect)
I don't think this will work reliably, e.g. even if your minibuffer only
has N lines of text, line wrapping different fonts used for different
scripts, plus overlays and text-properties applied to specific parts of
the minibuffer's content will make that computation fail to give the
desired result.
> 3) Just force the text to fit ignoring that the number of real visible
> lines will be different than max-mini-window-height.
It might not even be possible anyway if the minibuffer's content uses up
more space than available in the frame.
> (This will be seen as ignoring the max-mini-window-height)
Indeed, which is another problem with this option.
> 2) Modify the documentation of max-mini-window-height to specify that if
> an integer, it specifies a number of lines respecting to the frame's
> default font, not the minibuffer's visible lines.
That sounds good. It's not sufficient to fix the problem in
`icomplete-vertical` obviously, so `icomplete-vertical` would need to
be changed. Maybe it could check the `window-end` to detect when the
minibuffer's content is larger than what fits and shorten
it accordingly?
Stefan
Re: resize_mini_window question, Eli Zaretskii, 2020/09/18