summary refs log tree commit diff stats
path: root/compiler/ccgexprs.nim
diff options
context:
space:
mode:
authorErik Johansson Andersson <ephja@yandex.com>2015-11-28 21:21:42 +0100
committerErik Johansson Andersson <ephja@yandex.com>2015-11-28 21:21:42 +0100
commit61086b8e599a3317728b8d5aa04b5d30fa50133f (patch)
tree2a6eb5c3bee5efab8ca678fd21be70958d1b5f01 /compiler/ccgexprs.nim
parentcc6d9f69b4813f08809a223e967e4c00c8874144 (diff)
downloadNim-61086b8e599a3317728b8d5aa04b5d30fa50133f.tar.gz
flush after printing
Diffstat (limited to 'compiler/ccgexprs.nim')
-rw-r--r--compiler/ccgexprs.nim1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim
index 1a1c1eb6f..51f88d305 100644
--- a/compiler/ccgexprs.nim
+++ b/compiler/ccgexprs.nim
@@ -959,6 +959,7 @@ proc genEcho(p: BProc, n: PNode) =
       addf(args, ", $1? ($1)->data:\"nil\"", [rdLoc(a)])
   linefmt(p, cpsStmts, "printf($1$2);$n",
           makeCString(repeat("%s", n.len) & tnl), args)
+  linefmt(p, cpsStmts, "fflush(stdout);$n")
 
 proc gcUsage(n: PNode) =
   if gSelectedGC == gcNone: message(n.info, warnGcMem, n.renderTree)