From c02fa79591008740b0d5f7bf90dce2c073566482 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 19 Nov 2018 09:35:46 +0530 Subject: [PATCH] Fix #1153 --- kitty/parser.c | 3 +++ kitty_tests/parser.py | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/kitty/parser.c b/kitty/parser.c index c62499465..5393c7bda 100644 --- a/kitty/parser.c +++ b/kitty/parser.c @@ -641,8 +641,10 @@ dispatch_csi(Screen *screen, PyObject DUMP_UNUSED *dump_callback) { if (i > start) params[num_params++] = utoi(buf + start, i - start); switch(code) { case ICH: + if (end_modifier == ' ') { REPORT_ERROR("Shift left escape code not implemented"); break; } CALL_CSI_HANDLER1(screen_insert_characters, 1); case CUU: + if (end_modifier == ' ') { REPORT_ERROR("Shift right escape code not implemented"); break; } CALL_CSI_HANDLER1(screen_cursor_up2, 1); case CUD: case VPR: @@ -758,6 +760,7 @@ dispatch_csi(Screen *screen, PyObject DUMP_UNUSED *dump_callback) { case DECSCUSR: CALL_CSI_HANDLER1M(screen_set_cursor, 1); case SU: + if (end_modifier == ' ') { REPORT_ERROR("Select presentation directions escape code not implemented"); break; } CALL_CSI_HANDLER1(screen_scroll, 1); case SD: CALL_CSI_HANDLER1(screen_reverse_scroll, 1); diff --git a/kitty_tests/parser.py b/kitty_tests/parser.py index ff6a96b8a..def72aefe 100644 --- a/kitty_tests/parser.py +++ b/kitty_tests/parser.py @@ -171,6 +171,11 @@ class TestParser(BaseTest): self.assertTrue(s.cursor.blink) self.ae(s.cursor.shape, CURSOR_BLOCK) + s.reset() + pb('\033[3 @', ('Shift left escape code not implemented',)) + pb('\033[3 A', ('Shift right escape code not implemented',)) + pb('\033[3;4 S', ('Select presentation directions escape code not implemented',)) + def test_osc_codes(self): s = self.create_screen() pb = partial(self.parse_bytes_dump, s)