From 52d76c1f980179f2aab3a8714bec8022997f2b5e Mon Sep 17 00:00:00 2001 From: Anthony Howe Date: Sun, 10 Nov 2024 18:29:21 -0500 Subject: [PATCH] Fix alineInput() to flush output before getting the cursor position. --- src/aline.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/aline.c b/src/aline.c index 791ca8b..03e8465 100644 --- a/src/aline.c +++ b/src/aline.c @@ -175,6 +175,7 @@ alineInput(FILE *fp, const char *prompt, char *buf, size_t size) unsigned i; int ch, pcol, pos[2], prevline = lastline; + (void) fflush(stdout); if (!isatty(fileno(fp))) { *buf = '\0'; clearerr(fp); errno = 0;