Skip to content

Commit 084e2f0

Browse files
authored
interactive mode: print '\n' in sigint_handler, this flush stdout thus ensure color reset. (#283)
1 parent 0b366e7 commit 084e2f0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,7 @@ static bool is_interacting = false;
747747
#if defined (__unix__) || (defined (__APPLE__) && defined (__MACH__)) || defined (_WIN32)
748748
void sigint_handler(int signo) {
749749
printf(ANSI_COLOR_RESET);
750+
printf("\n"); // this also force flush stdout.
750751
if (signo == SIGINT) {
751752
if (!is_interacting) {
752753
is_interacting=true;

0 commit comments

Comments
 (0)