contour icon indicating copy to clipboard operation
contour copied to clipboard

wide emoji on trivial text lines to be inflated will become narrow emoji (bad cursor advancement)

Open christianparpart opened this issue 1 year ago • 3 comments
trafficstars

Refs #1215.

printf "A\u2764\uFE0F\u200D\U0001F525B\nA\u2764\uFE0FB\n"

This is properly printed to the terminal, but as soon as going into input normal mode and moving the cursor over/across the printed line, will make the emoji look narrow.

The bug most likely is in the inflation code, that is going to be rewritten in libunicode ASAP anyways. But we keep this ticket as a tracker to not forget about it.

image

christianparpart avatar Dec 20 '23 20:12 christianparpart

Also, this:

https://github.com/contour-terminal/contour/issues/1215#issuecomment-1865074121

Yaraslaut avatar Dec 21 '23 09:12 Yaraslaut

Behavior changed after https://github.com/contour-terminal/contour/pull/1501 PR but bug is still present

Yaraslaut avatar May 02 '24 14:05 Yaraslaut

Bug is happening during the inflation of the line, emoji use double width and therefore can not be split into two independent cells, and we end up in corrupted state when part of the emoji is inside one cell, and another part is in another cell with the next character, so for this case after inflation we have 1 -> A 2 -> half of the emoji 3 -> half of the emoji + B

Yaraslaut avatar May 03 '24 07:05 Yaraslaut