mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-27 15:10:53 +00:00
Fix arrow handling after fixing mouse clicking glitches ##cons
This commit is contained in:
parent
b552322004
commit
39993b39d7
@ -1696,19 +1696,6 @@ R_API const char *r_line_readline_cb(RLineReadCallback cb, void *user) {
|
||||
I.buffer.index = I.buffer.length;
|
||||
}
|
||||
break;
|
||||
case '[': // mouse click event
|
||||
// read until M
|
||||
for (;;) {
|
||||
ch = r_cons_readchar ();
|
||||
if (ch == -1) {
|
||||
r_cons_break_pop ();
|
||||
return NULL;
|
||||
}
|
||||
if (ch == 'M') {
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (I.vtmode == 2) {
|
||||
buf[1] = r_cons_readchar_timeout (50);
|
||||
@ -1717,10 +1704,12 @@ R_API const char *r_line_readline_cb(RLineReadCallback cb, void *user) {
|
||||
__print_prompt ();
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
buf[1] = r_cons_readchar_timeout (50);
|
||||
}
|
||||
if (buf[0] == 0x5b) { // [
|
||||
if (buf[0] == '[') { // [
|
||||
switch (buf[1]) {
|
||||
case '3': // supr
|
||||
case '3': // supr or mouse click
|
||||
__delete_next_char ();
|
||||
if (I.vtmode == 2) {
|
||||
buf[1] = r_cons_readchar ();
|
||||
@ -1729,6 +1718,16 @@ R_API const char *r_line_readline_cb(RLineReadCallback cb, void *user) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
for (;;) {
|
||||
ch = r_cons_readchar ();
|
||||
if (ch == -1) {
|
||||
r_cons_break_pop ();
|
||||
return NULL;
|
||||
}
|
||||
if (isupper (ch)) { // read until 'M'
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case '5': // pag up
|
||||
if (I.vtmode == 2) {
|
||||
|
Loading…
Reference in New Issue
Block a user