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

From: Aaron Jensen <[email-masked]>
Date: Sun, 18 Apr 2021 19:15:55 -0500

On Sun, Apr 18, 2021 at 1:03 PM Eli Zaretskii <[email-masked]> wrote:
> > I haven't been able to get selectrum out of the mix yet.
>
> Too bad.

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))