diff options
Diffstat (limited to 'sandbox')
-rw-r--r-- | sandbox/001-editor.mu | 6 | ||||
-rw-r--r-- | sandbox/003-shortcuts.mu | 6 | ||||
-rw-r--r-- | sandbox/004-programming-environment.mu | 12 | ||||
-rw-r--r-- | sandbox/005-sandbox.mu | 15 | ||||
-rw-r--r-- | sandbox/009-sandbox-trace.mu | 5 |
5 files changed, 28 insertions, 16 deletions
diff --git a/sandbox/001-editor.mu b/sandbox/001-editor.mu index 4ef9be36..fd44d493 100644 --- a/sandbox/001-editor.mu +++ b/sandbox/001-editor.mu @@ -193,7 +193,8 @@ recipe render screen:address:screen, editor:address:editor-data -> last-row:numb at-right?:boolean <- equal column, right break-unless at-right? # print wrap icon - print screen, 8617/loop-back-to-left, 245/grey + wrap-icon:character <- copy 8617/loop-back-to-left + print screen, wrap-icon, 245/grey column <- copy left row <- add row, 1 screen <- move-cursor screen, row, column @@ -227,10 +228,11 @@ recipe render screen:address:screen, editor:address:editor-data -> last-row:numb recipe clear-line-delimited screen:address:screen, column:number, right:number -> screen:address:screen [ local-scope load-ingredients + space:character <- copy 32/space { done?:boolean <- greater-than column, right break-if done? - screen <- print screen, 32/space + screen <- print screen, space column <- add column, 1 loop } diff --git a/sandbox/003-shortcuts.mu b/sandbox/003-shortcuts.mu index 79d53b2a..feab04ea 100644 --- a/sandbox/003-shortcuts.mu +++ b/sandbox/003-shortcuts.mu @@ -125,7 +125,8 @@ recipe delete-before-cursor editor:address:editor-data, screen:address:screen -> loop } # we're guaranteed not to be at the right margin - screen <- print screen, 32/space + space:character <- copy 32/space + screen <- print screen, space go-render? <- copy 0/false ] @@ -366,7 +367,8 @@ recipe delete-at-cursor editor:address:editor-data, screen:address:screen -> edi loop } # we're guaranteed not to be at the right margin - screen <- print screen, 32/space + space:character <- copy 32/space + screen <- print screen, space go-render? <- copy 0/false ] diff --git a/sandbox/004-programming-environment.mu b/sandbox/004-programming-environment.mu index 1535e75c..4a16d2fa 100644 --- a/sandbox/004-programming-environment.mu +++ b/sandbox/004-programming-environment.mu @@ -223,7 +223,8 @@ recipe render screen:address:screen, s:address:array:character, left:number, rig at-right?:boolean <- equal column, right break-unless at-right? # print wrap icon - print screen, 8617/loop-back-to-left, 245/grey + wrap-icon:character <- copy 8617/loop-back-to-left + print screen, wrap-icon, 245/grey column <- copy left row <- add row, 1 screen <- move-cursor screen, row, column @@ -238,7 +239,8 @@ recipe render screen:address:screen, s:address:array:character, left:number, rig { done?:boolean <- greater-than column, right break-if done? - print screen, 32/space + space:character <- copy 32/space + print screen, space column <- add column, 1 loop } @@ -284,7 +286,8 @@ recipe render-code screen:address:screen, s:address:array:character, left:number at-right?:boolean <- equal column, right break-unless at-right? # print wrap icon - print screen, 8617/loop-back-to-left, 245/grey + wrap-icon:character <- copy 8617/loop-back-to-left + print screen, wrap-icon, 245/grey column <- copy left row <- add row, 1 screen <- move-cursor screen, row, column @@ -299,7 +302,8 @@ recipe render-code screen:address:screen, s:address:array:character, left:number { done?:boolean <- greater-than column, right break-if done? - print screen, 32/space + space:character <- copy 32/space + print screen, space column <- add column, 1 loop } diff --git a/sandbox/005-sandbox.mu b/sandbox/005-sandbox.mu index db0a195b..a424209a 100644 --- a/sandbox/005-sandbox.mu +++ b/sandbox/005-sandbox.mu @@ -234,7 +234,8 @@ recipe render-sandboxes screen:address:screen, sandbox:address:sandbox-data, lef row <- add row, 1 screen <- move-cursor screen, row, left clear-line-delimited screen, left, right - print screen, 120/x, 245/grey + delete-icon:character <- copy 120/x + print screen, delete-icon, 245/grey # save menu row so we can detect clicks to it later starting-row:address:number <- get-address *sandbox, starting-row-on-screen:offset *starting-row <- copy row @@ -330,9 +331,11 @@ recipe render-screen screen:address:screen, sandbox-screen:address:screen, left: column <- copy left screen <- move-cursor screen, row, column # initial leader for each row: two spaces and a '.' - print screen, 32/space, 245/grey - print screen, 32/space, 245/grey - print screen, 46/full-stop, 245/grey + space:character <- copy 32/space + print screen, space, 245/grey + print screen, space, 245/grey + full-stop:character <- copy 46/period + print screen, full-stop, 245/grey column <- add left, 3 { # print row @@ -353,13 +356,13 @@ recipe render-screen screen:address:screen, sandbox-screen:address:screen, left: loop } # print final '.' - print screen, 46/full-stop, 245/grey + print screen, full-stop, 245/grey column <- add column, 1 { # clear rest of current line line-done?:boolean <- greater-than column, right break-if line-done? - print screen, 32/space + print screen, space column <- add column, 1 loop } diff --git a/sandbox/009-sandbox-trace.mu b/sandbox/009-sandbox-trace.mu index df74df47..45759b75 100644 --- a/sandbox/009-sandbox-trace.mu +++ b/sandbox/009-sandbox-trace.mu @@ -25,7 +25,8 @@ scenario sandbox-click-on-code-toggles-app-trace [ ] run [ event-loop screen:address:screen, console:address:console, 2:address:programming-environment-data - print screen:address:screen, 9251/␣/cursor + 4:character/cursor-icon <- copy 9251/␣ + print screen:address:screen, 4:character/cursor-icon ] # trace now printed and cursor shouldn't have budged screen-should-contain [ @@ -54,7 +55,7 @@ scenario sandbox-click-on-code-toggles-app-trace [ ] run [ event-loop screen:address:screen, console:address:console, 2:address:programming-environment-data - print screen:address:screen, 9251/␣/cursor + print screen:address:screen, 4:character/cursor-icon ] # trace hidden again screen-should-contain [ |