Fixed crash bug. Wide characters were sometimes causing an index out of range error. Now they are just treated as spaces.

This commit is contained in:
Storm Dragon
2026-08-17 02:26:04 -04:00
parent 93a2745065
commit 68462d00cb
3 changed files with 38 additions and 1 deletions
+20
View File
@@ -39,6 +39,26 @@ def test_private_sgr_sequence_from_fullscreen_apps_does_not_crash():
assert screen["text"].splitlines()[0] == "X "
@pytest.mark.unit
def test_overwritten_wide_character_stub_renders_as_space():
terminal = Terminal(4, 1, DummyProcessInput())
terminal.feed("\rX".encode())
screen = terminal.get_screen_content()
assert screen["text"] == "X "
@pytest.mark.unit
def test_wide_character_and_stub_keep_terminal_width():
terminal = Terminal(4, 1, DummyProcessInput())
terminal.feed("".encode())
screen = terminal.get_screen_content()
assert screen["text"] == ""
@pytest.mark.unit
def test_optional_float_setting_uses_default_when_missing():
settings_manager = type(