Subject: Re: bug#67715: 28.2; Minibuffer content is sometimes unexpectedly partially hidden

From: Markus Triska <[email-masked]>
Date: Sun, 10 Dec 2023 09:12:28 +0100

Eli Zaretskii <[email-masked]> writes:

> I'm adding Martin to this discussion in the hope that he could have
> some ideas.

Yes, thank you a lot Martin, I would greatly appreciate if you could
also look into this issue and help with it! For you in particular, it
may be interesting that the snippet works completely as expected if only
a single frame is present. For example, if I change the original snippet
by commenting out two lines to obtain:

    (let ((f (selected-frame)))
      ;; (with-selected-frame (make-frame)
      ;;   (switch-to-buffer (get-buffer-create "other")))
      (select-frame-set-input-focus f)
      (let ((win (get-buffer-window "other" t)))
        (when win
          (with-selected-window win
            (recenter 0)))
        (with-selected-window (minibuffer-window)
          (unwind-protect
              (progn
                (setq-local face-remapping-alist `((default :height 2.0)))
                (insert "hello")
                (read-key))
            (erase-buffer)))))

then "hello" is fully visible in the minibuffer, as expected! The
existence and prior, even only temporary, selection of another frame
unexpectedly prevents the entire minibuffer content to be shown. My
expectation would be for another frame to have no influence here.

Thank you and all the best,
Markus