Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8a778c1

Browse files
committedOct 1, 2023
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 8a778c1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎examples/main/main.cpp

+3-3
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,7 +719,6 @@ int main(int argc, char ** argv) {
721719

722720
is_interacting = true;
723721
printf("\n");
724-
console::set_display(console::user_input);
725722
fflush(stdout);
726723
} else if (params.instruct) {
727724
is_interacting = true;
@@ -747,6 +744,9 @@ int main(int argc, char ** argv) {
747744
printf("%s", buffer.c_str());
748745
}
749746

747+
// color user input only
748+
console::set_display(console::user_input);
749+
750750
std::string line;
751751
bool another_line = true;
752752
do {

0 commit comments

Comments
 (0)
Please sign in to comment.