Fix glitches when clicking in the hud ##visual

This commit is contained in:
pancake 2021-07-26 11:06:17 +02:00
parent ebd98157c9
commit 324a0ff77d
2 changed files with 15 additions and 0 deletions

View File

@ -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);

View File

@ -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