about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--edit/004-programming-environment.mu20
-rw-r--r--edit/005-sandbox.mu8
-rw-r--r--sandbox/004-programming-environment.mu11
-rw-r--r--sandbox/005-sandbox.mu6
4 files changed, 27 insertions, 18 deletions
diff --git a/edit/004-programming-environment.mu b/edit/004-programming-environment.mu
index f33bfe6f..78264212 100644
--- a/edit/004-programming-environment.mu
+++ b/edit/004-programming-environment.mu
@@ -106,7 +106,8 @@ def event-loop screen:&:screen, console:&:console, env:&:environment, resources:
         {
           break-unless more-events?
           render-all-on-no-more-events? <- copy 1/true  # no rendering now, full rendering on some future event
-          jump +finish-event
+          screen <- update-cursor screen, recipes, current-sandbox, sandbox-in-focus?, env
+          loop +next-event
         }
         {
           break-if more-events?
@@ -115,15 +116,17 @@ def event-loop screen:&:screen, console:&:console, env:&:environment, resources:
             # no more events, and we have to force render
             screen <- render-all screen, env, render
             render-all-on-no-more-events? <- copy 0/false
-            jump +finish-event
+            loop +next-event
           }
           # no more events, no force render
           {
             break-unless render?
             screen <- render-recipes screen, env, render
-            jump +finish-event
+            screen <- update-cursor screen, recipes, current-sandbox, sandbox-in-focus?, env
+            loop +next-event
           }
         }
+        screen <- update-cursor screen, recipes, current-sandbox, sandbox-in-focus?, env
       }
       {
         break-unless sandbox-in-focus?
@@ -134,7 +137,8 @@ def event-loop screen:&:screen, console:&:console, env:&:environment, resources:
         {
           break-unless more-events?
           render-all-on-no-more-events? <- copy 1/true  # no rendering now, full rendering on some future event
-          jump +finish-event
+          screen <- update-cursor screen, recipes, current-sandbox, sandbox-in-focus?, env
+          loop +next-event
         }
         {
           break-if more-events?
@@ -143,18 +147,18 @@ def event-loop screen:&:screen, console:&:console, env:&:environment, resources:
             # no more events, and we have to force render
             screen <- render-all screen, env, render
             render-all-on-no-more-events? <- copy 0/false
-            jump +finish-event
+            loop +next-event
           }
           # no more events, no force render
           {
             break-unless render?
             screen <- render-sandbox-side screen, env, render
-            jump +finish-event
+            screen <- update-cursor screen, recipes, current-sandbox, sandbox-in-focus?, env
+            loop +next-event
           }
+          screen <- update-cursor screen, recipes, current-sandbox, sandbox-in-focus?, env
         }
       }
-      +finish-event
-      screen <- update-cursor screen, recipes, current-sandbox, sandbox-in-focus?, env
     }
     loop
   }
diff --git a/edit/005-sandbox.mu b/edit/005-sandbox.mu
index 46bd41eb..2e16e05b 100644
--- a/edit/005-sandbox.mu
+++ b/edit/005-sandbox.mu
@@ -967,12 +967,13 @@ after <global-keypress> [
       number-of-sandboxes:num <- get *env, number-of-sandboxes:offset
       max:num <- subtract number-of-sandboxes, 1
       at-end?:bool <- greater-or-equal render-from, max
-      jump-if at-end?, +finish-event  # render nothing
+      loop-if at-end?, +next-event  # render nothing
       render-from <- add render-from, 1
       *env <- put *env, render-from:offset, render-from
     }
     screen <- render-sandbox-side screen, env, render
-    jump +finish-event
+    screen <- update-cursor screen, recipes, current-sandbox, sandbox-in-focus?, env
+    loop +next-event
   }
 ]
 
@@ -1001,7 +1002,8 @@ after <global-keypress> [
     render-from <- subtract render-from, 1
     *env <- put *env, render-from:offset, render-from
     screen <- render-sandbox-side screen, env, render
-    jump +finish-event
+    screen <- update-cursor screen, recipes, current-sandbox, sandbox-in-focus?, env
+    loop +next-event
   }
 ]
 
diff --git a/sandbox/004-programming-environment.mu b/sandbox/004-programming-environment.mu
index 7f0b4a05..796bee36 100644
--- a/sandbox/004-programming-environment.mu
+++ b/sandbox/004-programming-environment.mu
@@ -96,7 +96,8 @@ def event-loop screen:&:screen, console:&:console, env:&:environment, resources:
       {
         break-unless more-events?
         render-all-on-no-more-events? <- copy 1/true  # no rendering now, full rendering on some future event
-        jump +finish-event
+        screen <- update-cursor screen, current-sandbox, env
+        loop +next-event
       }
       {
         break-if more-events?
@@ -105,17 +106,17 @@ def event-loop screen:&:screen, console:&:console, env:&:environment, resources:
           # no more events, and we have to force render
           screen <- render-all screen, env, render
           render-all-on-no-more-events? <- copy 0/false
-          jump +finish-event
+          loop +next-event
         }
         # no more events, no force render
         {
           break-unless render?
           screen <- render-sandbox-side screen, env, render
-          jump +finish-event
+          screen <- update-cursor screen, current-sandbox, env
+          loop +next-event
         }
+        screen <- update-cursor screen, current-sandbox, env
       }
-      +finish-event
-      screen <- update-cursor screen, current-sandbox, env
     }
     loop
   }
diff --git a/sandbox/005-sandbox.mu b/sandbox/005-sandbox.mu
index a7df7a54..da8bc487 100644
--- a/sandbox/005-sandbox.mu
+++ b/sandbox/005-sandbox.mu
@@ -794,7 +794,8 @@ after <global-keypress> [
       *env <- put *env, render-from:offset, render-from
     }
     screen <- render-sandbox-side screen, env, render
-    jump +finish-event
+    screen <- update-cursor screen, current-sandbox, env
+    loop +next-event
   }
 ]
 
@@ -821,7 +822,8 @@ after <global-keypress> [
     render-from <- subtract render-from, 1
     *env <- put *env, render-from:offset, render-from
     screen <- render-sandbox-side screen, env, render
-    jump +finish-event
+    screen <- update-cursor screen, current-sandbox, env
+    loop +next-event
   }
 ]