Skip to content

Commit 178d0dd

Browse files
committed
No --in-prefix coloring
The `--in-prefix` text was inconsistently colored. Now, it's never colored, just like the `--in-suffix` text.
1 parent fd6b6b2 commit 178d0dd

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

examples/main/main.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -694,10 +694,8 @@ int main(int argc, char ** argv) {
694694
if (last_output.find(antiprompt, search_start_pos) != std::string::npos) {
695695
if (params.interactive) {
696696
is_interacting = true;
697-
console::set_display(console::user_input);
698697
}
699698
is_antiprompt = true;
700-
fflush(stdout);
701699
break;
702700
}
703701
}
@@ -721,8 +719,6 @@ int main(int argc, char ** argv) {
721719

722720
is_interacting = true;
723721
printf("\n");
724-
console::set_display(console::user_input);
725-
fflush(stdout);
726722
} else if (params.instruct) {
727723
is_interacting = true;
728724
}
@@ -747,6 +743,9 @@ int main(int argc, char ** argv) {
747743
printf("%s", buffer.c_str());
748744
}
749745

746+
// color user input only
747+
console::set_display(console::user_input);
748+
750749
std::string line;
751750
bool another_line = true;
752751
do {

0 commit comments

Comments
 (0)