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

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

bug#60015: 29.0.60; multi-line messages truncated in non-selected minibu


From: Juri Linkov
Subject: bug#60015: 29.0.60; multi-line messages truncated in non-selected minibuffer
Date: Thu, 15 Dec 2022 19:37:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

>> Is this not something that can be solved in set-minibuffer-message, like 
>> this:
>>
>> diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
>> index 6e42296e7ba..c10a6401180 100644
>> --- a/lisp/minibuffer.el
>> +++ b/lisp/minibuffer.el
>> @@ -817,6 +817,11 @@ set-minibuffer-message
>>                             ;; Make sure we can put-text-property.
>>                             (copy-sequence message)
>>                           (concat " [" message "]")))
>> +        (let ((window-lines (window-height minibuf-window))
>> +              (message-lines (length (split-string message "\n"))))
>> +          (when (> message-lines window-lines)
>> +            (with-selected-window minibuf-window
>> +              (enlarge-window (- message-lines window-lines)))))
>>           (unless (or (null minibuffer-message-properties)
>>                       ;; Don't overwrite the face properties the caller has 
>> set
>>                       (text-properties-at 0 message))
>
> This won't catch the case of a single very long line (which wraps to
> produce several screen lines).

Testing shows that it doesn't handle wrapped lines.

> Also, unconditionally enlarging the mini-window is not a good idea
> because it might already be tall enough.  Try the above in the recipe
> posted by Juri, but then type "C-c C-c" several times -- doesn't it
> keep enlarging the mini-window with each "C-c C-c"?

But OTOH it doesn't keep enlarging the mini-window with each "C-c C-c".





reply via email to

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