Fix #19065 - Fix prompt input when using scr.color=0 ##cons (#19067)

This commit is contained in:
pancake 2021-09-09 11:31:11 -07:00 committed by GitHub
parent 1c9432c849
commit 6fc305c5e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -671,10 +671,7 @@ static void selection_widget_down(int steps) {
}
static void print_rline_task(void *_core) {
RCore *core =(RCore *)_core;
if (core->cons->context->color_mode) {
r_cons_clear_line (0);
}
r_cons_clear_line (0);
r_cons_printf ("%s%s%s", Color_RESET, I.prompt, I.buffer.data);
r_cons_flush ();
}
@ -948,8 +945,8 @@ static void __print_prompt(void) {
r_cons_gotoxy (0, cons->rows);
r_cons_flush ();
}
r_cons_clear_line (0);
if (cons->context->color_mode > 0) {
r_cons_clear_line (0);
printf ("\r%s%s", Color_RESET, I.prompt);
} else {
printf ("\r%s", I.prompt);