Round-trip the zwj unicode character

Rendering of sequences containing zwj is still not implemented, since it
can cause the collapse of an unbounded number of characters into a
single cell. However, kitty at least preserves the zwj by storing it as
a combining character.
This commit is contained in:
Kovid Goyal
2018-08-04 18:29:45 +05:30
parent e05d48a574
commit 094ddd9333
7 changed files with 170 additions and 142 deletions

View File

@@ -96,6 +96,13 @@ class TestScreen(BaseTest):
self.ae(str(s.line(0)), q)
self.ae(s.cursor.x, 2)
def test_zwj(self):
s = self.create_screen(cols=20)
q = '\U0001f468\u200d\U0001f469\u200d\U0001f467\u200d\U0001f466'
s.draw(q)
self.ae(q, str(s.line(0)))
self.ae(s.cursor.x, 8)
def test_char_manipulation(self):
s = self.create_screen()