(per #283) try to force flush of color reset in SIGINT handler

This commit is contained in:
Rickey Bowers Jr 2023-03-19 11:27:16 -06:00
parent 9a1d2c76d0
commit 77117c7e4d

View file

@ -748,6 +748,7 @@ static bool is_interacting = false;
#if defined (__unix__) || (defined (__APPLE__) && defined (__MACH__)) || defined (_WIN32)
void sigint_handler(int signo) {
printf(ANSI_COLOR_RESET);
printf("\n"); // this also force flush stdout.
if (signo == SIGINT) {
if (!is_interacting) {
is_interacting=true;