diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2017-05-06 13:54:18 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2017-05-06 13:54:18 -0700 |
commit | 71d4ce1800b5df555aa7786b30f4d5d7fcd30352 (patch) | |
tree | b9fc3598491f215a64abe65f58297175e7b106da /edit | |
parent | 769a68cf1df678270f28c55a39f0aeca964aaf25 (diff) | |
download | mu-71d4ce1800b5df555aa7786b30f4d5d7fcd30352.tar.gz |
3843
Diffstat (limited to 'edit')
-rw-r--r-- | edit/004-programming-environment.mu | 20 | ||||
-rw-r--r-- | edit/005-sandbox.mu | 8 |
2 files changed, 17 insertions, 11 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 } ] |