Line editing for chat messages breaks with the character "裔" #141

Open
opened 2025-10-14 15:40:22 -06:00 by navan · 0 comments
Owner

Originally created by @dstu on 2/22/2025

When entering a chat message (in INSERT mode), pasting a character like (a 3-byte character in UTF-8: https://codepoints.net/U+88d4) causes the text insertion point to be drawn incorrectly. When appending text, it is drawn over characters instead of at the end of the line. I suspect that this is the result of computing an offset incorrectly.

For correct behavior, see this image, which shows where the text insertion point is located after I type asdf asdf:
Image

For incorrect behavior, see this image, which shows where the text insertion point is located after I type asdf裔asdf:
Image

After typing this character and exiting from INSERT mode, it is no longer possible to position the insertion point at the end of the text that has been entered. Pressing [END] and then a (to append text to the end of the line) allows text to be appended properly, but the text insertion point is located in a confusing position (which makes it look like text is going to be inserted between characters, when it is actually going to be appended).

*Originally created by @dstu on 2/22/2025* When entering a chat message (in INSERT mode), pasting a character like `裔` (a 3-byte character in UTF-8: https://codepoints.net/U+88d4) causes the text insertion point to be drawn incorrectly. When appending text, it is drawn over characters instead of at the end of the line. I suspect that this is the result of computing an offset incorrectly. For correct behavior, see this image, which shows where the text insertion point is located after I type `asdf asdf`: ![Image](https://github.com/user-attachments/assets/4813daf8-295b-4690-9310-d091512c26af) For incorrect behavior, see this image, which shows where the text insertion point is located after I type `asdf裔asdf`: ![Image](https://github.com/user-attachments/assets/0cba4ae6-a096-4591-bb11-fadb46655fd2) After typing this character and exiting from INSERT mode, it is no longer possible to position the insertion point at the end of the text that has been entered. Pressing `[END]` and then `a` (to append text to the end of the line) allows text to be appended properly, but the text insertion point is located in a confusing position (which makes it look like text is going to be inserted between characters, when it is actually going to be appended).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github/iamb#141
No description provided.