Subject: Re: bug#76852: 30.1; Regression in whitespace-mode causes display issue under terminal

From: Eli Zaretskii <[email-masked]>
Date: Sat, 08 Mar 2025 13:15:42 +0200

> From: 张海 <[email-masked]>
> Date: Fri, 7 Mar 2025 13:22:45 -0800
> 
> I recently updated from Emacs 29.4 to 30.1 and noticed an issue when I
> use global-whitespace-mode under terminal - each line would either
> automatically wrap before reaching the right edge of the terminal, or
> the cursor can go beyond the actual line end as if there were virtual
> spaces. Inserting new characters also results in characters after the
> insertion to drift right further than necessary and makes it
> impossible to properly edit a document. The amount of drifting seems
> to be related to the number of whitespace characters shown by
> whitespace-mode. A image showing the bug is available at
> https://imgur.com/a/PWbFgyE .
> 
> I verified that this issue occurs with `emacs -nw -q` (so that my
> .emacs isn't interfering) and the `*scratch*` buffer (its vanilla
> English-only content) using `M-x global-whitespace-mode` on Emacs 30.1
> runnin under gnome-terminal, gnome-console and foot (the Wayland
> terminal emulator) on most recent Arch Linux running GNOME 3 on
> Wayland. My locale is zh_CN.UTF-8 and my terminal font, i.e. the
> `monospace` font, is set to `WenQuanYi Micro Hei Mono` (文泉驿等宽微米黑 in
> Chinese, part of the wqy-microhei Arch Linxu package), if that
> matters. Downgrading to Emacs 29.4 immediately solved this issue so I
> believe it is a regression.
> 
> Here's a screen recoding and the coresponding termscript of this issue:
> - Video: https://imgur.com/a/IhA8JxD
> - Termscript: https://files.catbox.moe/tskpy8
> 
> I've also attached some environment info and output from `M-x
> report-emacs-bug` below, and hopefully they can be helpful in
> debugging this.Thanks in advance!

Thanks.

I cannot reproduce these problems, but then I don't have access to a
system with gnome-console.

Can someone please reproduce these display issues and debug them?