Fix autocompletion popup (#14958)

This commit is contained in:
dodococo 2019-09-04 22:32:13 +05:30 committed by radare
parent b4860e4eec
commit 879e4723bd
2 changed files with 2 additions and 1 deletions

View File

@ -370,6 +370,7 @@ R_API int r_cons_get_cur_line() {
#if __UNIX__
char buf[8];
struct termios save,raw;
fflush(stdout); // flush the Arrow keys escape keys which was messing up the output
(void) tcgetattr (0, &save);
cfmakeraw (&raw);
(void) tcsetattr (0, TCSANOW, &raw);

View File

@ -542,7 +542,7 @@ static void selection_widget_draw() {
pos_y = r_cons_get_cur_line ();
if (pos_y + sel_widget->h > cons->rows) {
printf ("%s\n", r_str_pad('\n', sel_widget->h));
pos_y = cons->rows - sel_widget->h;
pos_y = cons->rows - sel_widget->h - 1;
}
}
sel_widget->w = R_MIN (sel_widget->w, R_SELWIDGET_MAXW);