Handle CSI codes that start with a ;
This commit is contained in:
@@ -356,6 +356,7 @@ dispatch_csi(Screen *screen, PyObject DUMP_UNUSED *dump_callback) {
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (i > start) params[num_params++] = utoi(buf + start, i - start);
|
if (i > start) params[num_params++] = utoi(buf + start, i - start);
|
||||||
|
else if (i == start && buf[i] == ';') params[num_params++] = 0;
|
||||||
if (num_params >= MAX_PARAMS) { i = num; start = num + 1; }
|
if (num_params >= MAX_PARAMS) { i = num; start = num + 1; }
|
||||||
start = i + 1;
|
start = i + 1;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -108,6 +108,7 @@ class TestParser(BaseTest):
|
|||||||
pb('\033[38;2;1;2;3;48;2;7;8;9m', ('select_graphic_rendition', '38 2 1 2 3 48 2 7 8 9 '))
|
pb('\033[38;2;1;2;3;48;2;7;8;9m', ('select_graphic_rendition', '38 2 1 2 3 48 2 7 8 9 '))
|
||||||
self.ae(s.cursor.fg, 1 << 24 | 2 << 16 | 3 << 8 | 2)
|
self.ae(s.cursor.fg, 1 << 24 | 2 << 16 | 3 << 8 | 2)
|
||||||
self.ae(s.cursor.bg, 7 << 24 | 8 << 16 | 9 << 8 | 2)
|
self.ae(s.cursor.bg, 7 << 24 | 8 << 16 | 9 << 8 | 2)
|
||||||
|
pb('\033[;2m', ('select_graphic_rendition', '0 2 '))
|
||||||
c = s.callbacks
|
c = s.callbacks
|
||||||
pb('\033[5n', ('report_device_status', 5, 0))
|
pb('\033[5n', ('report_device_status', 5, 0))
|
||||||
self.ae(c.wtcbuf, b'\033[0n')
|
self.ae(c.wtcbuf, b'\033[0n')
|
||||||
|
|||||||
Reference in New Issue
Block a user