mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-20 15:35:03 +02:00
Ensure cursor is correctly positioned after emoji presentation char + VS15
cursor should be on the cell immediately after the the char since the variation selector makes the char one cell wide.
This commit is contained in:
@@ -429,6 +429,20 @@ class TestScreen(BaseTest):
|
||||
s.scroll(2, True)
|
||||
self.ae(s.text_for_selection(), expected)
|
||||
|
||||
def test_variation_selectors(self):
|
||||
s = self.create_screen()
|
||||
s.draw('\U0001f610')
|
||||
self.ae(s.cursor.x, 2)
|
||||
s.carriage_return(), s.linefeed()
|
||||
s.draw('\U0001f610\ufe0e')
|
||||
self.ae(s.cursor.x, 1)
|
||||
s.carriage_return(), s.linefeed()
|
||||
s.draw('\u25b6')
|
||||
self.ae(s.cursor.x, 1)
|
||||
s.carriage_return(), s.linefeed()
|
||||
s.draw('\u25b6\ufe0f')
|
||||
self.ae(s.cursor.x, 2)
|
||||
|
||||
def test_serialize(self):
|
||||
s = self.create_screen()
|
||||
s.draw('ab' * s.columns)
|
||||
|
||||
Reference in New Issue
Block a user