From 6fc305c5e6b524ed0a29d5500ea0d64ba667654f Mon Sep 17 00:00:00 2001 From: pancake Date: Thu, 9 Sep 2021 11:31:11 -0700 Subject: [PATCH] Fix #19065 - Fix prompt input when using scr.color=0 ##cons (#19067) --- libr/cons/dietline.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libr/cons/dietline.c b/libr/cons/dietline.c index d538cee8d1..14fc82987f 100644 --- a/libr/cons/dietline.c +++ b/libr/cons/dietline.c @@ -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);