Subject: bug#47860: 28.0.50; Mini buffer resize when lines are truncated regression

From: Gregory Heytings <[email-masked]>
Date: Mon, 19 Apr 2021 12:40:12 +0000

>
> Okay, narrowed it down:
>
> (setq hook
>      (lambda nil
>        (remove-hook 'minibuffer-setup-hook hook)
>        (setq-local overlay
>                    (make-overlay (point) (point) nil
>                                  'front-advance 'rear-advance))
>        (setq-local truncate-lines t)
>        (setq minibuf-after-string
> "a\nbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\nccc")
>        ;; (setq minibuf-after-string "a\nbbbbbbb\nccc")
>        (move-overlay overlay (point-max) (point-max))
>        (overlay-put overlay
>                     'after-string minibuf-after-string)))
>
> (unwind-protect
>    (progn
>      (add-hook 'minibuffer-setup-hook hook t)
>      (read-from-minibuffer ""))
>  (remove-hook 'minibuffer-setup-hook hook))
>

Thanks.  But what do you expect this code to do?  I tested it, and for 
Emacs 24 to 27 you see only "a" in the minibuffer.  After commit 
56c42bd28d, you see two lines, "a" and "bbb...".