When parsing CSI codes allow - as a primary modifier

Fixes #1438
This commit is contained in:
Kovid Goyal 2019-03-08 09:58:18 +05:30
parent 748f1a90b9
commit 428c600788
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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] == '!' || buf[0] == '=') { if (buf[0] == '>' || 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--;
} }
@ -994,6 +994,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);