xtermjs / xterm.js

A terminal for the web
https://xtermjs.org/
MIT License
17.33k stars 1.61k forks source link

softhyphen not shown #4961

Open jerch opened 6 months ago

jerch commented 6 months ago

Softhyphens have no screen repr in xterm.js.

Repro:

node -e "console.log('### Soft\xadhy\xadphen is awk\xadward in ter\xadmi\xadnals. ###')"

image

VTE/gnome-terminal has the same issue: image

Others like konsole and kitty strip it from grid progression: image

Contour does something funny, it tries to keep the grid progression intact by moving follow-up chars to the left with creating bigger spaces in between: image

Last but not least most older TEs like xterm, aterm and rxvt show a smaller dash inplace, thus have a visual repr and keep the grid progression intact (note the difference to the normal minus dash in the second line): image

To me the last group makes the most sense, we could mimick that by using \u2010 as visual char for it: image

For a stronger emphasis on the difference to a normal dash, we could also use \uff65: image

For ref, also see: https://en.wikipedia.org/wiki/Hyphen#Unicode