diff --git a/kitty/parser.c b/kitty/parser.c index 2d2f6cc91..03ce1829c 100644 --- a/kitty/parser.c +++ b/kitty/parser.c @@ -283,8 +283,9 @@ handle_esc_mode_char(Screen *screen, uint32_t ch, PyObject DUMP_UNUSED *dump_cal REPORT_COMMAND(screen_set_8bit_controls, ch == 'G'); screen_set_8bit_controls(screen, ch == 'G'); break; + default: + REPORT_ERROR("Unhandled ESC SP escape code: 0x%x", ch); break; } - REPORT_ERROR("Unhandled ESC SP escape code: 0x%x", ch); break; break; default: REPORT_ERROR("Unhandled charset related escape code: 0x%x 0x%x", screen->parser_buf[0], ch); break; diff --git a/kitty_tests/parser.py b/kitty_tests/parser.py index 94bdfae06..97e47eadf 100644 --- a/kitty_tests/parser.py +++ b/kitty_tests/parser.py @@ -215,6 +215,17 @@ class TestParser(BaseTest): pb('\033P$qr\033\\', ('screen_request_capabilities', ord('$'), 'r')) self.ae(c.wtcbuf, '\033P1$r{};{}r\033\\'.format(s.margin_top + 1, s.margin_bottom + 1).encode('ascii')) + def test_sc81t(self): + s = self.create_screen() + pb = partial(self.parse_bytes_dump, s) + pb('\033 G', ('screen_set_8bit_controls', 1)) + c = s.callbacks + pb('\033P$qm\033\\', ('screen_request_capabilities', ord('$'), 'm')) + self.ae(c.wtcbuf, b'\x901$r0m\x9c') + c.clear() + pb('\033[0c', ('report_device_attributes', 0, 0)) + self.ae(c.wtcbuf, b'\x9b?62;c') + def test_oth_codes(self): s = self.create_screen() pb = partial(self.parse_bytes_dump, s)