From 54edd3d25e990cdf6ead2f0cdf685bc23de85edf Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 23 Jun 2017 23:03:56 -0700 Subject: 3943 Undo commit 3938 and almost everything after. Let's do this right. --- edit/005-sandbox.mu | 33 --------------------------------- 1 file changed, 33 deletions(-) (limited to 'edit/005-sandbox.mu') diff --git a/edit/005-sandbox.mu b/edit/005-sandbox.mu index f27c1a2c..9970bbae 100644 --- a/edit/005-sandbox.mu +++ b/edit/005-sandbox.mu @@ -14,8 +14,6 @@ def! main [ env:&:environment <- new-programming-environment 0/filesystem, 0/screen env <- restore-sandboxes env, 0/filesystem render-all 0/screen, env, render - wait-for-some-interaction - $exit event-loop 0/screen, 0/console, env, 0/filesystem ] @@ -270,15 +268,12 @@ def! render-sandbox-side screen:&:screen, env:&:environment, render-editor:rende clear-rest-of-screen screen, row, left, right # assert-no-scroll screen, old-top-idx -#? stash [render sandbox side done] ] def render-sandboxes screen:&:screen, sandbox:&:sandbox, left:num, right:num, row:num, render-from:num, idx:num -> row:num, screen:&:screen, sandbox:&:sandbox [ local-scope load-ingredients return-unless sandbox -#? a:num b:num <- cursor-position screen -#? stash [render-sandboxes] idx [:] row [--] a b screen-height:num <- screen-height screen at-bottom?:bool <- greater-or-equal row, screen-height return-if at-bottom? @@ -287,8 +282,6 @@ def render-sandboxes screen:&:screen, sandbox:&:sandbox, left:num, right:num, ro break-if hidden? # render sandbox menu row <- add row, 1 -#? at-bottom?:bool <- greater-or-equal row, screen-height -#? return-if at-bottom? screen <- move-cursor screen, row, left screen <- render-sandbox-menu screen, idx, left, right # save menu row so we can detect clicks to it later @@ -350,32 +343,6 @@ def render-sandbox-menu screen:&:screen, sandbox-index:num, left:num, right:num clear-line-until screen, right, 52/background-red ] -scenario skip-rendering-sandbox-menu-past-bottom-row [ - trace-until 100/app # trace too long - assume-screen 100/width, 6/height - # recipe editor is empty - assume-resources [ - [lesson/0] <- [|add 2, 2|] - [lesson/1] <- [|add 1, 1|] - ] - # create two sandboxes such that the top one just barely fills the screen - env:&:environment <- new-programming-environment resources, screen, [] - env <- restore-sandboxes env, resources -#? $clear-trace - run [ - render-all screen, env, render - ] -#? $dump-trace [app] - screen-should-contain [ - . run (F4) . - . ┊ . - .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊─────────────────────────────────────────────────. - . ┊0 edit copy to recipe delete . - . ┊add 2, 2 . - . ┊─────────────────────────────────────────────────. - ] -] - # divide up the menu bar for a sandbox into 3 segments, for edit/copy/delete buttons # delete-button-right == right # all left/right pairs are inclusive -- cgit 1.4.1-2-gfad0