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

From: Eli Zaretskii <[email-masked]>
Date: Mon, 19 Apr 2021 20:40:40 +0300

> Date: Mon, 19 Apr 2021 20:15:15 +0300
> From: Eli Zaretskii <[email-masked]>
> Cc: [email-masked], [email-masked]
> 
> So the root cause is in window-text-pixel-size when this crazy mix of
> overlays is used.  Will take a look when I have time.

And here's a much simpler recipe:

  (progn
    (with-current-buffer (get-buffer-create "foo")
      (insert "test: ")
      (overlay-put (make-overlay (point-max) (point-max))
		   'after-string "
  \naaa\nbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\ncccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc")
      (setq-local truncate-lines t))
    (switch-to-buffer "foo")
    (window-text-pixel-size))

The result indicates that the buffer has only 4 screen lines, whereas
it actually has 5.