File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -670,7 +670,7 @@ int main(int argc, char ** argv) {
670670 }
671671 fflush (stdout);
672672 }
673- // reset color to default if we there is no pending user input
673+ // reset color to default if there is no pending user input
674674 if (input_echo && (int ) embd_inp.size () == n_consumed) {
675675 console::set_display (console::reset);
676676 }
@@ -697,10 +697,8 @@ int main(int argc, char ** argv) {
697697 if (last_output.find (antiprompt, search_start_pos) != std::string::npos) {
698698 if (params.interactive ) {
699699 is_interacting = true ;
700- console::set_display (console::user_input);
701700 }
702701 is_antiprompt = true ;
703- fflush (stdout);
704702 break ;
705703 }
706704 }
@@ -724,8 +722,6 @@ int main(int argc, char ** argv) {
724722
725723 is_interacting = true ;
726724 printf (" \n " );
727- console::set_display (console::user_input);
728- fflush (stdout);
729725 } else if (params.instruct ) {
730726 is_interacting = true ;
731727 }
@@ -750,6 +746,9 @@ int main(int argc, char ** argv) {
750746 printf (" %s" , buffer.c_str ());
751747 }
752748
749+ // color user input only
750+ console::set_display (console::user_input);
751+
753752 std::string line;
754753 bool another_line = true ;
755754 do {
You can’t perform that action at this time.
0 commit comments