This commit is contained in:
Kovid Goyal 2018-11-19 09:35:46 +05:30
parent 6f0a59c696
commit c02fa79591
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 8 additions and 0 deletions

View File

@ -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);

View File

@ -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)