about summary refs log tree commit diff stats
path: root/edit/005-sandbox.mu
diff options
context:
space:
mode:
Diffstat (limited to 'edit/005-sandbox.mu')
-rw-r--r--edit/005-sandbox.mu17
1 files changed, 15 insertions, 2 deletions
diff --git a/edit/005-sandbox.mu b/edit/005-sandbox.mu
index 8db55206..caa3e6e6 100644
--- a/edit/005-sandbox.mu
+++ b/edit/005-sandbox.mu
@@ -47,6 +47,7 @@ scenario run-and-show-results [
   ]
   # sandbox editor contains an instruction without storing outputs
   env:&:environment <- new-programming-environment resources, screen, [divide-with-remainder 11, 3]
+  render-all screen, env, render
   # run the code in the editors
   assume-console [
     press F4
@@ -129,12 +130,17 @@ after <global-keypress> [
     break-unless do-run?
     screen <- update-status screen, [running...       ], 245/grey
     error?:bool <- run-sandboxes env, resources, screen
-    # F4 might update warnings and results on both sides
-    screen <- render-all screen, env, render
+    # we could just render-all, but we do some work to minimize the number of prints to screen
+    <render-recipe-errors-on-F4>
+    screen <- render-sandbox-side screen, env, render
     {
       break-if error?
       screen <- update-status screen, [                 ], 245/grey
     }
+    {
+      break-unless error?
+      <render-sandbox-errors-on-F4>
+    }
     screen <- update-cursor screen, recipes, current-sandbox, sandbox-in-focus?, env
     loop +next-event
   }
@@ -551,6 +557,8 @@ scenario run-updates-results [
   ]
   # sandbox editor contains an instruction without storing outputs
   env:&:environment <- new-programming-environment resources, screen, [foo]  # contents of sandbox editor
+  render-all screen, env, render
+  $clear-trace
   # run the code in the editors
   assume-console [
     press F4
@@ -568,6 +576,10 @@ scenario run-updates-results [
     .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊                                                 .
     .                                                  ┊                                                 .
   ]
+  # no need to update editor
+  trace-should-not-contain [
+    app: render recipes
+  ]
   # make a change (incrementing one of the args to 'add'), then rerun
   assume-console [
     left-click 4, 28  # one past the value of the second arg
@@ -602,6 +614,7 @@ scenario run-instruction-manages-screen-per-sandbox [
   ]
   # sandbox editor contains an instruction
   env:&:environment <- new-programming-environment resources, screen, [print screen, 4]  # contents of sandbox editor
+  render-all screen, env, render
   # run the code in the editor
   assume-console [
     press F4