Subject: 26.1; Minibuffer sometimes shrinks unexpectedly

From: Markus Triska <[email-masked]>
Date: Sat, 23 Mar 2019 19:01:16 +0100

Please start Emacs with "emacs -Q", and then evaluate the form:

    (with-selected-window (minibuffer-window)
      (erase-buffer)
      (insert (propertize "hello" 'face '(:height 3.0)))
      (read-key)
      (read-key)
      (insert (propertize " there!" 'face '(:height 3.0)))
      (read-key)
      (erase-buffer))

What I observe is:

    1) "hello" is displayed in the minibuffer, and the minibuffer
       grows so that the text is entirely visible
    2) when I then press a key, the minibuffer unexpectedly shrinks,
       and the same text is now no longer fully visible
    3) when I then press another key, " there!" is added,
       and the minibuffer is grown again

What I expect is that throughout the whole interaction, the minibuffer
consistently stay at the required size to show the entire text.

In addition, when I remove the first or second read-key call above,
i.e., when I instead evaluate the form:

    (with-selected-window (minibuffer-window)
      (erase-buffer)
      (insert (propertize "hello" 'face '(:height 3.0)))
      (read-key)
      (insert (propertize " there!" 'face '(:height 3.0)))
      (read-key)
      (erase-buffer))

then the minibuffer indeed does stay at the expected size throughout.
Hence, the size of the minibuffer unexpectedly depends on whether
read-key is invoked once or twice.

Thank you and all the best,
Markus

In GNU Emacs 26.1 (build 1, x86_64-apple-darwin15.3.0, X toolkit, Xaw scroll bars)
 of 2018-09-22 built on mt-computer
Windowing system distributor 'The X.Org Foundation', version 11.0.11502000

Configured features:
XPM JPEG TIFF GIF PNG GSETTINGS NOTIFY ACL GNUTLS LIBXML2 FREETYPE XFT
ZLIB TOOLKIT_SCROLL_BARS LUCID X11 MODULES THREADS LCMS2