about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-03-29 17:30:15 +0100
committerbptato <nincsnevem662@gmail.com>2024-03-29 17:30:15 +0100
commitd2a384f20f5555000c8aa9a711bc88a1c3ce2efe (patch)
tree31af0a27d73363c024b59111059dfe7a0f65853f
parenta73bdecc9111bfd377b26b069d989030eb767d1f (diff)
downloadchawan-d2a384f20f5555000c8aa9a711bc88a1c3ce2efe.tar.gz
term: flush stdout in anyKey
-rw-r--r--src/local/term.nim1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/local/term.nim b/src/local/term.nim
index 29a0a68b..e8f989cd 100644
--- a/src/local/term.nim
+++ b/src/local/term.nim
@@ -212,6 +212,7 @@ proc isatty*(term: Terminal): bool =
 proc anyKey*(term: Terminal; msg = "[Hit any key]") =
   if term.isatty():
     term.outfile.write(term.clearEnd() & msg)
+    term.outfile.flushFile()
     discard term.istream.sreadChar()
 
 proc resetFormat(term: Terminal): string =