~rockorager/vaxis#17: 
Character width detection with CJK text

I was reading an email with interwoven English and Chinese via aerc and I noticed that CJK text (which is usually double the width of latin characters) is handled incorrectly. If I have a line full of 测试 proceeded a blank line followed by lines of AAAAAA, and I scroll down, sometimes the blank line will have ghost As floating around, usually aligned with the right half of each CJK character.

Seen:

测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测                                                                   
-  A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A

Expected:

测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测
-

It's not very reproducible though; on every run, I can get something to break, but I can't seem to deterministically get the same line to break.

This also happens when I just open a :term and use less or nvim.

I've also observed that a messed up terminal can be cured by changing the window size.

Screencast: https://www.andrewyu.org/aerc.mkv (link may expire) Demo file: https://paste.sr.ht/blob/838a040bcd13a511a88e3910c4eeba7927f68058

Status
RESOLVED FIXED
Submitter
~runxiyu
Assigned to
No-one
Submitted
5 months ago
Updated
5 months ago
Labels
No labels applied.

~rockorager REPORTED FIXED 5 months ago

Tim Culverhouse referenced this ticket in commit a5a37b1.

Register here or Log in to comment, or comment via email.