Subject: Re: bug#79317: 31.0.50; Garbled text in corner case

From: Eli Zaretskii <[email-masked]>
Date: Tue, 26 Aug 2025 16:27:02 +0300

> From: OGAWA Hirofumi <[email-masked]>
> Date: Tue, 26 Aug 2025 17:03:26 +0900
> 
> 
> In current emacs, in corner case, the displayed text is garbled.
> Simplified reproducible code is the following,
> 
> (with-temp-buffer
>   (dotimes (_ 3)
>     (insert "😀😀😀\n"))
>   (add-to-invisibility-spec '(gnus-sum . t))
>   (goto-char (point-min))
>   (let ((starteol (line-end-position)))
>     (forward-line 2)
>   (search-backward "\n")
>   (let ((ol (make-overlay starteol (point) nil t nil)))
>     (overlay-put ol 'invisible 'gnus-sum)
>     ;; here
>     )))
> 
> At ";; here" position, first line uses proper font and text, but send
> line is garbled text.  And if comment out the
> `add-to-invisibility-spec', no garbled text.

Thanks for a simple and concise test case.  This should be fixed now
on the master branch.