contour icon indicating copy to clipboard operation
contour copied to clipboard

Some grapheme clusters gain a lot of extra padding after being highlighted

Open j4james opened this issue 7 months ago • 2 comments

Contour Terminal version

0.6.1.7494

Installer source

GitHub: Release page attachment

Operating System

Ubuntu Linux 24.04.1

Architecture

x86-64 / amd64

Other Software

No response

Steps to reproduce

Execute the following statements from a bash shell:

printf "[\U1f44d\U1f3fb]\n"
printf "[\U1f3f3\Ufe0f\U200d\U1f308]\n"
printf "[\U1f441\Ufe0f]\n"

Note the width of each glyph between the [] brackets.

Now use the mouse to highlight all of the text on the page and note what happens to the [] brackets surrounding those glyphs.

Expected Behavior

Both before and after highlighting the text, I'd expect the glyphs to take up two columns, looking like this:

Image

Actual Behavior

After highlighting the text, some of the glyphs appear to gain extra padding to the right, pushing the ] angle bracket across by 12 columns.

Image

Additional notes

I haven't tried to determine what exactly triggers the issue, but I'll note that the two cases that failed both used a VS16 modifier (U+FE0F).

j4james avatar Apr 26 '25 18:04 j4james

I suppose this is the same as here: https://github.com/contour-terminal/contour/issues/1461

Yaraslaut avatar May 29 '25 20:05 Yaraslaut

It could be. It sound similar to the issue linked from there (#1375), although kind of backwards (in that case it looks like the glyphs get narrower after the cursor moves over them, where in my case they're getting wider). The underlying issue may well be the same, though, so feel free to close as a duplicate if that makes sense to you.

j4james avatar May 29 '25 21:05 j4james