You are not logged in.

#1 2025-12-11 14:36:40

gcb
Member
Registered: 2014-02-12
Posts: 212

xterm regression, randomly hides text

after this weeks update to xterm-404-1, now text disappear from the screen on some cases.

for example, my prompt shows the path with some terminal-escape yellow color.

if I run some command that uses colors, e.g. `ls`, it will disappear from the screen! ...well, it becomes black-on-black. I can still select it with the mouse and it's there. And if i clear the screen (ctrl+l) the text is back. pressing tab-tab to show bash's auto complete also hides the text.

nothing of this happens on older versions of xterm. Nor on kterm or any other terminal.

Offline

#2 2025-12-11 15:42:55

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,081

Re: xterm regression, randomly hides text

https://invisible-island.net/xterm/xterm.log.html looks unsuspicious itr.

#!/bin/bash
    for fgbg in 38 48 ; do # Foreground / Background                                                                            
        echo "\\e[${fgbg};5;<number>m"                                                                                          
        for color in {0..255} ; do # Colors                                                                                     
            # Display the color                                                                                                 
            printf "\e[${fgbg};5;%sm  %3s  \e[0m" $color $color                                                                 
            # Display 16 colors per lines                                                                                       
            if [ $((($color + 1) % 16)) == 0 ] ; then                                                                           
                echo # New line                                                                                                 
            fi
        done
        echo # New line
    done

Does that look the same across terminals?

Offline

#3 2025-12-12 11:28:53

gcb
Member
Registered: 2014-02-12
Posts: 212

Re: xterm regression, randomly hides text

yes, they look exactly the same. Also the colors generated here are not affected by the bug... that is, when i press tab-tab, the path part of my prompt disappears from all lines (and scrollback) but none of the colors here do. So it might some other escape sequence (or other thing) that I have there. not depending on the color, as i assumed.

(noticed konsole completely ignores my .Xresource's `.foreground` and `.background` entry, while respecting most of the other color options.)


my prompt is printed with some ungodly bash function that ultimately printf this

printf '(\001%s\002%s\001%s\002%s)%s %s %s \001%s\002%s\001%s\002 %s%s%s' $'\E[33m\E[1m' 0 '' $'\E[0m' ...

but i haven't touched that in ages and it worked fine on all emulators from w32 putty, iterm2, anything linux and unix over decades. I think the most recent addition was a couple emojis almost a decade ago smile

Also noticed that clear/ctrl+l resets the bug.

Last edited by gcb (2025-12-12 11:29:42)

Offline

#4 2025-12-12 11:32:57

gcb
Member
Registered: 2014-02-12
Posts: 212

Re: xterm regression, randomly hides text

Offline

#5 2025-12-12 11:54:00

gcb
Member
Registered: 2014-02-12
Posts: 212

Re: xterm regression, randomly hides text

It is the emoji hmm

If i simply replace the home emoji there with "NO" then the issue doesn't show up.

Absolutely no other escaping chances. Just the emoji itself and nothing else.

Last edited by gcb (2025-12-12 11:54:43)

Offline

#6 2025-12-12 11:55:48

gcb
Member
Registered: 2014-02-12
Posts: 212

Re: xterm regression, randomly hides text

it also happens on regular command line...

$ # commented bash line (some emoji) text (some emoji) text
$ (some emoji) text ^c
$ [tab-tab]

after the tab-tab on the next line, the previously type "text" (all three of them above) disappears too. only the first emoji per line remains.

Last edited by gcb (2025-12-12 11:56:47)

Offline

#7 2025-12-12 16:03:15

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,081

Re: xterm regression, randomly hides text

It is the emoji

That's extremely likely

T.E.D. wrote:

change wcwidth for private-use codes, to make them consistently neutral width, i.e., single/double width according to whether they are used for CJK.

What "emoji" is is specifically (utf8 codepoint) and does it "help" to add an extra blank behind it?

Offline

#8 2025-12-16 01:23:04

gcb
Member
Registered: 2014-02-12
Posts: 212

Re: xterm regression, randomly hides text

anyone have the same problem? or is it something in my setup?

seth wrote:

What "emoji" is is specifically (utf8 codepoint) and does it "help" to add an extra blank behind it?

all of them!

as far as I can tell, any bundle of emojis will stay on the screen. anything after the first bundle of emoji per line, will be gone after the "trigger".

e.g. (text1)(emoji1)(emoji2)(text2)(emoji3)(text3) -> after the trigger (text1)(emoji1)(emoji2)

The trigger is harder to define...
- bash tab completion is always a trigger, always.
- ls --color sometimes is a trigger.

then there's the reset trigger (which makes the text visible again)
- highlighting text with the mouse SOMETIMES is a reset trigger.

Offline

#9 2025-12-16 09:44:35

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,081

Re: xterm regression, randomly hides text

all of them!

That's not an answer. "Emojis" are nasty but technically not a thing.
The specific code points matter a lot for the context.

Assuming you're using some nerd font, https://www.nerdfonts.com/cheat-sheet
Search for "home"; do glyphs w/ 4 digits behave different than the ones w/ 5 digits?

Offline

#10 2025-12-16 13:18:17

gcb
Member
Registered: 2014-02-12
Posts: 212

Re: xterm regression, randomly hides text

seth wrote:

all of them!

That's not an answer. "Emojis" are nasty but technically not a thing.
The specific code points matter a lot for the context.

Assuming you're using some nerd font, https://www.nerdfonts.com/cheat-sheet
Search for "home"; do glyphs w/ 4 digits behave different than the ones w/ 5 digits?


oh boy. i gave up understanding these things... But giving it a try again. I am using a nerd font, but they don't render any of those glyphs
xterm_nerdfont.png
(the values after "this is" are what I copied directly by clicking on the things from the above site you provided, and the echo'ed value are copyed from the copy-UTF link)

I think I used to have a fontsconfig file that overrode those glyphs with the noto-coloremoji, but i can't find this. I might have dropped when I moved to nerdfont.

Well, I was doing my tests with kde emoji picker. Whatever that means to whom understands unicode arcane arts.

Last edited by gcb (2025-12-16 13:20:16)

Offline

#11 2025-12-16 14:43:11

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,081

Re: xterm regression, randomly hides text

Those only work if you've a nerd font installed.
I'm just guess you're using  U+1F3E0 - https://www.emojiall.com/en/code/1F3E0 because I can actually reproduce it with that.
The U+eb06 nerd font glyph doesn't show the behavior so it's the wide char patches.

Edit: and now I can't any more.
This is weird…

Last edited by seth (2025-12-16 14:45:58)

Offline

#12 2025-12-17 16:00:28

gcb
Member
Registered: 2014-02-12
Posts: 212

Re: xterm regression, randomly hides text

i do use a nerdfont.

 $ grep -i nerd .Xresources 
UXTerm*faceName: xft:ZedMono Nerd Font Mono
XTerm*faceName: xft:ZedMono Nerd Font Mono

Man i really hate having to reason about unicode smile

Why my font cannot show "\uEB06"?! (it shows as the dashed rectangle)

anyway, here is xterm after `xrdb -remove; xrdb file_with_only_fontface_line`

xterm404-no-resources.png

the text after the red light emoji, disappeared. the text after the "\uEB06" didn't disappear, but the emoji is not show either so ... not sure what to think.

Offline

#13 2025-12-18 15:41:56

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,081

Re: xterm regression, randomly hides text

https://www.compart.com/en/unicode/U+EB06 is in that PUA

fc-match :charset=EB06

Does

xterm -fa "ZedMono Nerd Font Mono

work?

Offline

#14 2025-12-22 17:49:05

gcb
Member
Registered: 2014-02-12
Posts: 212

Re: xterm regression, randomly hides text

all the same.

Offline

#15 2025-12-22 18:10:10

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,081

Re: xterm regression, randomly hides text

I meant whether you get the font and the nerd symbols with that.

Offline

#16 2025-12-23 02:16:12

gcb
Member
Registered: 2014-02-12
Posts: 212

Re: xterm regression, randomly hides text

i mean, nothing change from the previous screenshots.

But I think something is odd. Here's konsole and xterm. Both using the same nerdfont. Konsole have colorful emoji.

(I used to replace the emoji range with noto-color-emoji using font-config, but i dont' have that file anymore. maybe something in the distro now?)

xterm_n_konsole.png


...ouch, there's some 40 files in /usr/share/fontconfig/default

hum, most are aliases. only 40 and 60 are about emoji, and they do exactly what my very old file did... replace emojis with noto-color. sigh. Ok, so in the end, I have zero idea where the b&w emojis i see on xterm are coming from smile

Offline

#17 2025-12-23 02:18:24

gcb
Member
Registered: 2014-02-12
Posts: 212

Re: xterm regression, randomly hides text

lol. I had a typo on my font name. And I didn't have Zed.

I do get the glyphs if i type iosevka right.
(i blame kde for not letting my copy text from a list)

Also noticed this makes text in vim disappears too. So that rules out something i'm doing with escape codes (even tough i'm testing with a blank env too sometimes)

Last edited by gcb (2025-12-23 02:29:30)

Offline

#18 2025-12-23 10:58:28

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,081

Re: xterm regression, randomly hides text

Ok, in exterm, using your nerd font: can you trigger the problem by using (only) a non-wide char emoji like U+eb06 at all?
If not it's pretty safe to say that something's wrong about the wide-char patch and that's now probably also addressed in 406
https://invisible-island.net/xterm/xterm.log.html
https://bugs.debian.org/cgi-bin/bugrepo … ug=1123509

Edit:

I suspect that this is due to an inconsistency between the xterm behavior and wcwidth(), which may affect various applications that rely on wcwidth().

lol do you get this w/ zsh as well?
(Doesn't matter since there seem multiple clients affected, just for my sanity)

Last edited by seth (2025-12-23 11:00:25)

Offline

Board footer

Powered by FluxBB