about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--304screen.subx8
-rw-r--r--apps/tui.mu1
2 files changed, 8 insertions, 1 deletions
diff --git a/304screen.subx b/304screen.subx
index 33d280a0..8ab0f4b0 100644
--- a/304screen.subx
+++ b/304screen.subx
@@ -288,6 +288,7 @@ reset-formatting-on-real-screen:
     (write-buffered Stdout "(B")
     (write-buffered Stdout Esc)
     (write-buffered Stdout "[m")
+    (flush Stdout)
 $reset-formatting-on-real-screen:end:
     # . epilogue
     89/<- %esp 5/r32/ebp
@@ -319,6 +320,7 @@ start-color-on-real-screen:  # fg: int, bg: int
     (write %ecx "m")
     # flush
     (write-stream-data Stdout %ecx)
+    (flush Stdout)
 $start-color-on-real-screen:end:
     # . reclaim locals
     81 0/subop/add %esp 0x2c/imm32
@@ -336,6 +338,7 @@ start-bold-on-real-screen:
     #
     (write-buffered Stdout Esc)
     (write-buffered Stdout "[1m")
+    (flush Stdout)
 $start-bold-on-real-screen:end:
     # . epilogue
     89/<- %esp 5/r32/ebp
@@ -349,6 +352,7 @@ start-underline-on-real-screen:
     #
     (write-buffered Stdout Esc)
     (write-buffered Stdout "[4m")
+    (flush Stdout)
 $start-underline-on-real-screen:end:
     # . epilogue
     89/<- %esp 5/r32/ebp
@@ -362,6 +366,7 @@ start-reverse-video-on-real-screen:
     #
     (write-buffered Stdout Esc)
     (write-buffered Stdout "[7m")
+    (flush Stdout)
 $start-reverse-video-on-real-screen:end:
     # . epilogue
     89/<- %esp 5/r32/ebp
@@ -376,6 +381,7 @@ start-blinking-on-real-screen:
     #
     (write-buffered Stdout Esc)
     (write-buffered Stdout "[5m")
+    (flush Stdout)
 $start-blinking-on-real-screen:end:
     # . epilogue
     89/<- %esp 5/r32/ebp
@@ -389,6 +395,7 @@ hide-cursor-on-real-screen:
     #
     (write-buffered Stdout Esc)
     (write-buffered Stdout "[?25l")
+    (flush Stdout)
 $hide-cursor-on-real-screen:end:
     # . epilogue
     89/<- %esp 5/r32/ebp
@@ -404,6 +411,7 @@ show-cursor-on-real-screen:
     (write-buffered Stdout "[?12l")
     (write-buffered Stdout Esc)
     (write-buffered Stdout "[?25h")
+    (flush Stdout)
 $show-cursor-on-real-screen:end:
     # . epilogue
     89/<- %esp 5/r32/ebp
diff --git a/apps/tui.mu b/apps/tui.mu
index 4af4d405..939210c6 100644
--- a/apps/tui.mu
+++ b/apps/tui.mu
@@ -14,7 +14,6 @@ fn main -> exit-status/ebx: int {
   start-blinking 0
   print-string 0, "Hello world!"
   reset-formatting 0
-  flush-stdout
   move-cursor 0, 6, 0x22
   print-string 0, "tty dimensions: "
   print-int32-hex 0, nrows