Fix wrap marker when continuing to a new line with a multicell command

This commit is contained in:
Kovid Goyal
2024-12-27 10:00:26 +05:30
parent 95fbc6e9ba
commit 5b0e1b5b5c
3 changed files with 7 additions and 7 deletions

View File

@@ -53,6 +53,7 @@ def test_multicell(self: TestMulticell) -> None:
ae('vertical_align')
ae('text')
ae('natural_width')
ae('next_char_was_wrapped')
if 'cursor' in assertions:
self.ae(assertions['cursor'], (s.cursor.x, s.cursor.y), msg)
@@ -127,9 +128,13 @@ def test_multicell(self: TestMulticell) -> None:
# Test wrapping
s.reset()
s.draw('x' * (s.columns - 1))
multicell(s, 'a', scale=2)
ac(s.columns - 1, 0, is_multicell=False, text='', next_char_was_wrapped=True)
s.reset()
multicell(s, 'a', scale=2)
s.draw('x' * s.columns)
ac(s.cursor.x-1, s.cursor.y, is_multicell=False, text='x')
ac(s.cursor.x-1, s.cursor.y, is_multicell=False, text='x', next_char_was_wrapped=False)
ac(0, 0, is_multicell=True, text='a')
ac(0, 1, is_multicell=True, text='', y=1)