From 77855ac6f9f7b1175b2c5b59d1a256e71c8ad70e Mon Sep 17 00:00:00 2001 From: night0721 Date: Fri, 25 Oct 2024 22:20:57 +0100 Subject: [PATCH] Flush output to work on most system --- src/90s.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/90s.c b/src/90s.c index 44acadf..2a13c3d 100644 --- a/src/90s.c +++ b/src/90s.c @@ -138,6 +138,7 @@ void highlight(char *buffer, char **paths) { printf("\x1b[38;2;243;139;168m%s\x1b[0m", buffer); // print red as invalid command } } + fflush(stdout); free(command_without_arg); } @@ -456,6 +457,7 @@ void command_loop(char **paths) { strcpy(arrow, "ยป"); arrow = color_text(arrow, blue); printf("%s %s %s ", modtime, cwd, arrow); + fflush(stdout); cmd_count = 0; // upward arrow key resets command count line = readline(paths);