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) {
670
670
}
671
671
fflush (stdout);
672
672
}
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
674
674
if (input_echo && (int ) embd_inp.size () == n_consumed) {
675
675
console::set_display (console::reset);
676
676
}
@@ -697,10 +697,8 @@ int main(int argc, char ** argv) {
697
697
if (last_output.find (antiprompt, search_start_pos) != std::string::npos) {
698
698
if (params.interactive ) {
699
699
is_interacting = true ;
700
- console::set_display (console::user_input);
701
700
}
702
701
is_antiprompt = true ;
703
- fflush (stdout);
704
702
break ;
705
703
}
706
704
}
@@ -724,8 +722,6 @@ int main(int argc, char ** argv) {
724
722
725
723
is_interacting = true ;
726
724
printf (" \n " );
727
- console::set_display (console::user_input);
728
- fflush (stdout);
729
725
} else if (params.instruct ) {
730
726
is_interacting = true ;
731
727
}
@@ -750,6 +746,9 @@ int main(int argc, char ** argv) {
750
746
printf (" %s" , buffer.c_str ());
751
747
}
752
748
749
+ // color user input only
750
+ console::set_display (console::user_input);
751
+
753
752
std::string line;
754
753
bool another_line = true ;
755
754
do {
You can’t perform that action at this time.
0 commit comments