about summary refs log tree commit diff stats
path: root/071print.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-05-14 15:40:31 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-05-14 16:03:08 -0700
commit8e41a2b8e5228d24d6adab986ec64dcd54f0f326 (patch)
tree729b79bf96703fd94338fadb3938c15f104ca0eb /071print.mu
parent3b168e0076e632e873cf423d5296f47d45a2b341 (diff)
downloadmu-8e41a2b8e5228d24d6adab986ec64dcd54f0f326.tar.gz
1374 - chessboard end-to-end test passes!
After like 40 seconds (because of the 120-column screen), but whatever.

The final bug was that clear-screen wasn't actually working right for
fake screens.

(The trace is too large for github, so I'm going to leave it out for
now.)
Diffstat (limited to '071print.mu')
-rw-r--r--071print.mu9
1 files changed, 9 insertions, 0 deletions
diff --git a/071print.mu b/071print.mu
index 94b645d3..2c7250ba 100644
--- a/071print.mu
+++ b/071print.mu
@@ -30,6 +30,8 @@ recipe init-fake-screen [
 recipe clear-screen [
   default-space:address:array:location <- new location:type, 30:literal
   x:address:screen <- next-ingredient
+#?   $print [clearing screen
+#? ] #? 1
   # if x exists
   {
     break-unless x:address:screen
@@ -45,6 +47,11 @@ recipe clear-screen [
       i:number <- add i:number, 1:literal
       loop
     }
+    # reset cursor
+    cur:address:number <- get-address x:address:screen/deref, cursor-row:offset
+    cur:address:number/deref <- copy 0:literal
+    cur:address:number <- get-address x:address:screen/deref, cursor-column:offset
+    cur:address:number/deref <- copy 0:literal
     reply x:address:screen/same-as-ingredient:0
   }
   # otherwise, real screen
@@ -101,6 +108,8 @@ recipe print-character [
       }
       reply x:address:screen/same-as-ingredient:0
     }
+#?     $print [saving character ], c:character, [ to fake screen ], cursor:address/screen, [ 
+#? ] #? 1
     cursor:address:character/deref <- copy c:character
     # increment column unless it's already all the way to the right
     {