Fix #1423
This commit is contained in:
parent
61a9f7baae
commit
e33af8b2f8
@ -612,7 +612,7 @@ dispatch_csi(Screen *screen, PyObject DUMP_UNUSED *dump_callback) {
|
|||||||
unsigned int num = screen->parser_buf_pos, start, i, num_params=0, p1, p2;
|
unsigned int num = screen->parser_buf_pos, start, i, num_params=0, p1, p2;
|
||||||
static unsigned int params[MAX_PARAMS] = {0};
|
static unsigned int params[MAX_PARAMS] = {0};
|
||||||
bool private;
|
bool private;
|
||||||
if (buf[0] == '>' || buf[0] == '?' || buf[0] == '!') {
|
if (buf[0] == '>' || buf[0] == '?' || buf[0] == '!' || buf[0] == '=') {
|
||||||
start_modifier = (char)screen->parser_buf[0];
|
start_modifier = (char)screen->parser_buf[0];
|
||||||
buf++; num--;
|
buf++; num--;
|
||||||
}
|
}
|
||||||
@ -993,6 +993,7 @@ accumulate_csi(Screen *screen, uint32_t ch, PyObject DUMP_UNUSED *dump_callback)
|
|||||||
case '?':
|
case '?':
|
||||||
case '>':
|
case '>':
|
||||||
case '!':
|
case '!':
|
||||||
|
case '=':
|
||||||
if (screen->parser_buf_pos != 0) {
|
if (screen->parser_buf_pos != 0) {
|
||||||
REPORT_ERROR("Invalid character in CSI: 0x%x, ignoring the sequence", ch);
|
REPORT_ERROR("Invalid character in CSI: 0x%x, ignoring the sequence", ch);
|
||||||
SET_STATE(0);
|
SET_STATE(0);
|
||||||
|
|||||||
@ -114,6 +114,7 @@ class TestParser(BaseTest):
|
|||||||
pb('\033[20;4h', ('screen_set_mode', 20, 0), ('screen_set_mode', 4, 0))
|
pb('\033[20;4h', ('screen_set_mode', 20, 0), ('screen_set_mode', 4, 0))
|
||||||
pb('\033[?1000;1004h', ('screen_set_mode', 1000, 1), ('screen_set_mode', 1004, 1))
|
pb('\033[?1000;1004h', ('screen_set_mode', 1000, 1), ('screen_set_mode', 1004, 1))
|
||||||
pb('\033[20;4;20l', ('screen_reset_mode', 20, 0), ('screen_reset_mode', 4, 0), ('screen_reset_mode', 20, 0))
|
pb('\033[20;4;20l', ('screen_reset_mode', 20, 0), ('screen_reset_mode', 4, 0), ('screen_reset_mode', 20, 0))
|
||||||
|
pb('\033[=c', ('report_device_attributes', 0, 61))
|
||||||
s.reset()
|
s.reset()
|
||||||
|
|
||||||
def sgr(params):
|
def sgr(params):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user