diff --git a/src/nms.c b/src/nms.c index db441ec..aa3cf2a 100644 --- a/src/nms.c +++ b/src/nms.c @@ -131,6 +131,9 @@ char nmsexec(char *src) { usleep(TYPE_EFFECT_SPEED * 1000); } + // Flush any input up to this point + flushinp(); + // Reopen stdin for interactive input (keyboard), then require user // to press a key to continue. if (!isatty(STDIN_FILENO)) @@ -215,6 +218,9 @@ char nmsexec(char *src) { attroff(COLOR_PAIR(1)); } + // Flush any input up to this point + flushinp(); + // If stdin is set to the keyboard, user must press a key to continue if (isatty(STDIN_FILENO)) ret = getch();