about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-01-13 19:53:30 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-01-13 19:53:30 -0800
commitea5b8c23642f1a84a8ba37fde79979e5f70f7221 (patch)
tree149463639508c6745a6c5f7b49daa8ba8b4f683e
parent7ea584b892d1a82fc179a4314304da9a09ecee9e (diff)
downloadmu-ea5b8c23642f1a84a8ba37fde79979e5f70f7221.tar.gz
550 - another bugfix, another pending test
-rw-r--r--chessboard-cursor.mu3
-rw-r--r--mu.arc4
2 files changed, 7 insertions, 0 deletions
diff --git a/chessboard-cursor.mu b/chessboard-cursor.mu
index 568b8224..767354a6 100644
--- a/chessboard-cursor.mu
+++ b/chessboard-cursor.mu
@@ -215,6 +215,8 @@
   (2:channel-address/raw <- init-channel 1:literal)
   (fork-helper send-prints-to-stdout:fn nil:literal/globals nil:literal/limit 2:channel-address/raw)
   { begin
+    ; print any stray characters from keyboard *before* clearing screen
+    (flush-stdout)
     (clear-screen)
     (print-primitive (("Stupid text-mode chessboard. White pieces in uppercase; black pieces in lowercase. No checking for legal moves." literal)))
     (cursor-to-next-line)
@@ -243,5 +245,6 @@
 ;   'q' exits
 ;   'q' exits anywhere in move
 ;   'q' exits on second move
+;   flush stdout after printing out move and before clearing screen
 ;
 ;   backspace, ctrl-u
diff --git a/mu.arc b/mu.arc
index 6b89a213..ee6f840d 100644
--- a/mu.arc
+++ b/mu.arc
@@ -1908,6 +1908,10 @@
   }
 )
 
+(init-fn flush-stdout
+  (sleep for-some-cycles:literal 1:literal)
+)
+
 ; after all system software is loaded:
 (freeze system-function*)
 )  ; section 100 for system software