mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-19 05:38:43 +00:00
Fix glitches when clicking in the hud ##visual
This commit is contained in:
parent
ebd98157c9
commit
324a0ff77d
@ -1696,6 +1696,19 @@ 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);
|
||||
|
@ -262,6 +262,7 @@ R_API char *r_cons_hud(RList *list, const char *prompt) {
|
||||
hud->top_entry_n = 0;
|
||||
r_cons_show_cursor (false);
|
||||
r_cons_enable_mouse (false);
|
||||
r_cons_set_raw (true);
|
||||
r_cons_clear ();
|
||||
|
||||
// Repeat until the user exits the hud
|
||||
@ -344,6 +345,7 @@ R_API char *r_cons_hud_line(RList *list, const char *prompt) {
|
||||
hud->top_entry_n = 0;
|
||||
r_cons_show_cursor (false);
|
||||
r_cons_enable_mouse (false);
|
||||
r_cons_set_raw (true);
|
||||
|
||||
r_cons_reset ();
|
||||
// Repeat until the user exits the hud
|
||||
|
Loading…
x
Reference in New Issue
Block a user