about summary refs log tree commit diff stats
path: root/sandbox/005-sandbox.mu
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/005-sandbox.mu')
-rw-r--r--sandbox/005-sandbox.mu14
1 files changed, 9 insertions, 5 deletions
diff --git a/sandbox/005-sandbox.mu b/sandbox/005-sandbox.mu
index 2ad25dd4..19bce3d7 100644
--- a/sandbox/005-sandbox.mu
+++ b/sandbox/005-sandbox.mu
@@ -106,14 +106,15 @@ after <global-keypress> [
   {
     do-run?:boolean <- equal *k, 65532/F4
     break-unless do-run?
-    status:address:shared:array:character <- new [running...  ]
+    status:address:shared:array:character <- new [running...       ]
     screen <- update-status screen, status, 245/grey
     error?:boolean, env, screen <- run-sandboxes env, screen
     # F4 might update warnings and results on both sides
     screen <- render-all screen, env
     {
       break-if error?
-      status:address:shared:array:character <- new [            ]
+#?       $print [update-status: clearing], 10/newline
+      status:address:shared:array:character <- new [                 ]
       screen <- update-status screen, status, 245/grey
     }
     screen <- update-cursor screen, current-sandbox
@@ -127,6 +128,7 @@ recipe run-sandboxes env:address:shared:programming-environment-data, screen:add
   errors-found?:boolean, env, screen <- update-recipes env, screen
   reply-if errors-found?
   # check contents of editor
+  <run-sandboxes-begin>
   current-sandbox:address:shared:editor-data <- get *env, current-sandbox:offset
   {
     sandbox-contents:address:shared:array:character <- editor-contents current-sandbox
@@ -151,13 +153,15 @@ recipe run-sandboxes env:address:shared:programming-environment-data, screen:add
   save-sandboxes env
   # run all sandboxes
   curr:address:shared:sandbox-data <- get *env, sandbox:offset
+  idx:number <- copy 0
   {
     break-unless curr
-    curr <- update-sandbox curr, env
+    curr <- update-sandbox curr, env, idx
     curr <- get *curr, next-sandbox:offset
+    idx <- add idx, 1
     loop
   }
-  reply 0/no-errors-found, env/same-as-ingredient:0, screen/same-as-ingredient:1
+  <run-sandboxes-end>
 ]
 
 # load code from recipes.mu
@@ -171,7 +175,7 @@ recipe update-recipes env:address:shared:programming-environment-data, screen:ad
 ]
 
 # replaced in a later layer
-recipe update-sandbox sandbox:address:shared:sandbox-data -> sandbox:address:shared:sandbox-data [
+recipe! update-sandbox sandbox:address:shared:sandbox-data, env:address:shared:programming-environment-data, idx:number -> sandbox:address:shared:sandbox-data, env:address:shared:programming-environment-data [
   local-scope
   load-ingredients
   data:address:shared:array:character <- get *sandbox, data:offset