diff --git a/kitty_tests/datatypes.py b/kitty_tests/datatypes.py index d1c66b5f0..e9e41c3b1 100644 --- a/kitty_tests/datatypes.py +++ b/kitty_tests/datatypes.py @@ -338,6 +338,9 @@ class TestDataTypes(BaseTest): self.ae(tuple(map(w, 'a1\0コニチ ✔')), (1, 1, 0, 2, 2, 2, 1, 1)) self.ae(wcswidth('\u2716\u2716\ufe0f\U0001f337'), 5) self.ae(wcswidth('\033a\033[2mb'), 2) + # Regional indicator symbols (unicode flags) are defined as having + # Emoji_Presentation so must have width 2 + self.ae(tuple(map(w, '\U0001f1ee\U0001f1f3')), (2, 2)) tpl = truncate_point_for_length self.ae(tpl('abc', 4), 3) self.ae(tpl('abc', 2), 2)