Oops, broke ; in escapes with that

This commit is contained in:
K. Lange 2018-08-18 19:59:19 +09:00
parent 3c545f00ed
commit 9a9ff0f32e

View File

@ -3274,17 +3274,18 @@ int handle_escape(int * this_buf, int * timeout, int c) {
return 1;
}
if (*timeout >= 1 && this_buf[*timeout-1] == '\033' && c == '[') {
*timeout = 1;
this_buf[*timeout] = c;
(*timeout)++;
return 0;
}
if (*timeout >= 2 && this_buf[*timeout-2] == '\033' && this_buf[*timeout-1] == '[' &&
if (*timeout >= 2 && this_buf[0] == '\033' && this_buf[1] == '[' &&
(isdigit(c) || c == ';')) {
this_buf[*timeout] = c;
(*timeout)++;
return 0;
}
if (*timeout >= 2 && this_buf[*timeout-2] == '\033' && this_buf[*timeout-1] == '[') {
if (*timeout >= 2 && this_buf[0] == '\033' && this_buf[1] == '[') {
switch (c) {
case 'M':
handle_mouse();