GNU bug report logs -
#60015
29.0.60; multi-line messages truncated in non-selected minibuffer
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Mon, 12 Dec 2022 18:08:02 UTC
Severity: normal
Found in version 29.0.60
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>
> Here is a better test case. Please evaluate:
>
> (progn
> (keymap-global-set "C-c C-c" (lambda () (interactive) (message "abc\ndef")))
> nil)
>
> Then the bug can be reproduced with just these keys:
>
> M-x
> C-x o
> C-c C-c
>
> Only the top line is displayed in the minibuffer.
>
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 bug report was last modified 2 years and 152 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.