diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2017-12-03 23:25:40 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2017-12-03 23:25:40 -0800 |
commit | 4a48bedcd1d708a43d43dc6259a4e45c52ea3d00 (patch) | |
tree | 85c1b7310cca932797d727a3de8da96eb175d8da /html/edit | |
parent | ef7d834fdd826977cd8d43253052a7b8e1c5aa72 (diff) | |
download | mu-4a48bedcd1d708a43d43dc6259a4e45c52ea3d00.tar.gz |
4134 - 'input' = 'ingredient'
Diffstat (limited to 'html/edit')
-rw-r--r-- | html/edit/001-editor.mu.html | 14 | ||||
-rw-r--r-- | html/edit/002-typing.mu.html | 28 | ||||
-rw-r--r-- | html/edit/003-shortcuts.mu.html | 46 | ||||
-rw-r--r-- | html/edit/004-programming-environment.mu.html | 22 | ||||
-rw-r--r-- | html/edit/005-sandbox.mu.html | 30 | ||||
-rw-r--r-- | html/edit/006-sandbox-copy.mu.html | 16 | ||||
-rw-r--r-- | html/edit/007-sandbox-delete.mu.html | 6 | ||||
-rw-r--r-- | html/edit/008-sandbox-edit.mu.html | 4 | ||||
-rw-r--r-- | html/edit/009-sandbox-test.mu.html | 6 | ||||
-rw-r--r-- | html/edit/010-sandbox-trace.mu.html | 4 | ||||
-rw-r--r-- | html/edit/011-errors.mu.html | 6 | ||||
-rw-r--r-- | html/edit/012-editor-undo.mu.html | 2 |
12 files changed, 92 insertions, 92 deletions
diff --git a/html/edit/001-editor.mu.html b/html/edit/001-editor.mu.html index 215debfd..2f22aa64 100644 --- a/html/edit/001-editor.mu.html +++ b/html/edit/001-editor.mu.html @@ -68,7 +68,7 @@ if ('onhashchange' in window) { <span id="L4" class="LineNr"> 4 </span><span class="Comment"># screen dimensions, then stop</span> <span id="L5" class="LineNr"> 5 </span><span class="muRecipe">def</span> main text:text [ <span id="L6" class="LineNr"> 6 </span> <span class="Constant">local-scope</span> -<span id="L7" class="LineNr"> 7 </span> <span class="Constant">load-ingredients</span> +<span id="L7" class="LineNr"> 7 </span> <span class="Constant">load-inputs</span> <span id="L8" class="LineNr"> 8 </span> open-console <span id="L9" class="LineNr"> 9 </span> <a href='../081print.mu.html#L46'>clear-screen</a> <span class="Constant">0/screen</span> <span class="Comment"># non-scrolling app</span> <span id="L10" class="LineNr"> 10 </span> e:&:editor <span class="Special"><-</span> <a href='001-editor.mu.html#L51'>new-editor</a> text, <span class="Constant">0/left</span>, <span class="Constant">5/right</span> @@ -114,7 +114,7 @@ if ('onhashchange' in window) { <span id="L50" class="LineNr"> 50 </span><span class="Comment"># right is exclusive</span> <span id="L51" class="LineNr"> 51 </span><span class="muRecipe">def</span> <a href='001-editor.mu.html#L51'>new-editor</a> s:text, left:num, right:num<span class="muRecipe"> -> </span>result:&:editor [ <span id="L52" class="LineNr"> 52 </span> <span class="Constant">local-scope</span> -<span id="L53" class="LineNr"> 53 </span> <span class="Constant">load-ingredients</span> +<span id="L53" class="LineNr"> 53 </span> <span class="Constant">load-inputs</span> <span id="L54" class="LineNr"> 54 </span> <span class="Comment"># no clipping of bounds</span> <span id="L55" class="LineNr"> 55 </span> right <span class="Special"><-</span> subtract right,<span class="Constant"> 1</span> <span id="L56" class="LineNr"> 56 </span> result <span class="Special"><-</span> new <span class="Constant">editor:type</span> @@ -135,7 +135,7 @@ if ('onhashchange' in window) { <span id="L71" class="LineNr"> 71 </span> <span id="L72" class="LineNr"> 72 </span><span class="muRecipe">def</span> <a href='001-editor.mu.html#L72'>insert-text</a> editor:&:editor, text:text<span class="muRecipe"> -> </span>editor:&:editor [ <span id="L73" class="LineNr"> 73 </span> <span class="Constant">local-scope</span> -<span id="L74" class="LineNr"> 74 </span> <span class="Constant">load-ingredients</span> +<span id="L74" class="LineNr"> 74 </span> <span class="Constant">load-inputs</span> <span id="L75" class="LineNr"> 75 </span> curr:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">data:offset</span> <span id="L76" class="LineNr"> 76 </span> insert curr, text <span id="L77" class="LineNr"> 77 </span>] @@ -170,7 +170,7 @@ if ('onhashchange' in window) { <span id="L106" class="LineNr">106 </span><span class="Comment"># outside text.</span> <span id="L107" class="LineNr">107 </span><span class="muRecipe">def</span> <a href='001-editor.mu.html#L107'>render</a> <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, editor:&:editor<span class="muRecipe"> -> </span>last-row:num, last-column:num, <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, editor:&:editor [ <span id="L108" class="LineNr">108 </span> <span class="Constant">local-scope</span> -<span id="L109" class="LineNr">109 </span> <span class="Constant">load-ingredients</span> +<span id="L109" class="LineNr">109 </span> <span class="Constant">load-inputs</span> <span id="L110" class="LineNr">110 </span> <span class="muControl">return-unless</span> editor, <span class="Constant">1/top</span>, <span class="Constant">0/left</span> <span id="L111" class="LineNr">111 </span> left:num <span class="Special"><-</span> get *editor, <span class="Constant">left:offset</span> <span id="L112" class="LineNr">112 </span> <a href='../081print.mu.html#L782'>screen-height</a>:num <span class="Special"><-</span> <a href='../081print.mu.html#L782'>screen-height</a> <a href='../081print.mu.html#L16'>screen</a> @@ -270,7 +270,7 @@ if ('onhashchange' in window) { <span id="L206" class="LineNr">206 </span> <span id="L207" class="LineNr">207 </span><span class="muRecipe">def</span> <a href='001-editor.mu.html#L207'>clear-screen-from</a> <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, row:num, column:num, left:num, right:num<span class="muRecipe"> -> </span><a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a> [ <span id="L208" class="LineNr">208 </span> <span class="Constant">local-scope</span> -<span id="L209" class="LineNr">209 </span> <span class="Constant">load-ingredients</span> +<span id="L209" class="LineNr">209 </span> <span class="Constant">load-inputs</span> <span id="L210" class="LineNr">210 </span><span class="CommentedCode">#? stash [clear-screen-from] row column [between] left [and] right</span> <span id="L211" class="LineNr">211 </span> <span class="Comment"># if it's the real screen, use the optimized primitive</span> <span id="L212" class="LineNr">212 </span> <span class="Delimiter">{</span> @@ -286,7 +286,7 @@ if ('onhashchange' in window) { <span id="L222" class="LineNr">222 </span> <span id="L223" class="LineNr">223 </span><span class="muRecipe">def</span> <a href='001-editor.mu.html#L223'>clear-rest-of-screen</a> <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, row:num, left:num, right:num<span class="muRecipe"> -> </span><a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a> [ <span id="L224" class="LineNr">224 </span> <span class="Constant">local-scope</span> -<span id="L225" class="LineNr">225 </span> <span class="Constant">load-ingredients</span> +<span id="L225" class="LineNr">225 </span> <span class="Constant">load-inputs</span> <span id="L226" class="LineNr">226 </span> row <span class="Special"><-</span> add row,<span class="Constant"> 1</span> <span id="L227" class="LineNr">227 </span> <span class="Comment"># if it's the real screen, use the optimized primitive</span> <span id="L228" class="LineNr">228 </span> <span class="Delimiter">{</span> @@ -460,7 +460,7 @@ if ('onhashchange' in window) { <span id="L396" class="LineNr">396 </span><span class="Comment"># so far the previous color is all the information we need; that may change</span> <span id="L397" class="LineNr">397 </span><span class="muRecipe">def</span> <a href='001-editor.mu.html#L397'>get-color</a> color:num, c:char<span class="muRecipe"> -> </span>color:num [ <span id="L398" class="LineNr">398 </span> <span class="Constant">local-scope</span> -<span id="L399" class="LineNr">399 </span> <span class="Constant">load-ingredients</span> +<span id="L399" class="LineNr">399 </span> <span class="Constant">load-inputs</span> <span id="L400" class="LineNr">400 </span> color-is-white?:bool <span class="Special"><-</span> equal color, <span class="Constant">7/white</span> <span id="L401" class="LineNr">401 </span> <span class="Comment"># if color is white and next character is '#', switch color to blue</span> <span id="L402" class="LineNr">402 </span> <span class="Delimiter">{</span> diff --git a/html/edit/002-typing.mu.html b/html/edit/002-typing.mu.html index eb828377..459e32c0 100644 --- a/html/edit/002-typing.mu.html +++ b/html/edit/002-typing.mu.html @@ -67,7 +67,7 @@ if ('onhashchange' in window) { <span id="L4" class="LineNr"> 4 </span><span class="Comment"># hit ctrl-c to exit</span> <span id="L5" class="LineNr"> 5 </span><span class="muRecipe">def!</span> main text:text [ <span id="L6" class="LineNr"> 6 </span> <span class="Constant">local-scope</span> -<span id="L7" class="LineNr"> 7 </span> <span class="Constant">load-ingredients</span> +<span id="L7" class="LineNr"> 7 </span> <span class="Constant">load-inputs</span> <span id="L8" class="LineNr"> 8 </span> open-console <span id="L9" class="LineNr"> 9 </span> <a href='../081print.mu.html#L46'>clear-screen</a> <span class="Constant">0/screen</span> <span class="Comment"># non-scrolling app</span> <span id="L10" class="LineNr"> 10 </span> editor:&:editor <span class="Special"><-</span> <a href='001-editor.mu.html#L51'>new-editor</a> text, <span class="Constant">5/left</span>, <span class="Constant">45/right</span> @@ -78,7 +78,7 @@ if ('onhashchange' in window) { <span id="L15" class="LineNr"> 15 </span> <span id="L16" class="LineNr"> 16 </span><span class="muRecipe">def</span> <a href='002-typing.mu.html#L16'>editor-event-loop</a> <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, <a href='../084console.mu.html#L23'>console</a>:&:<a href='../084console.mu.html#L23'>console</a>, editor:&:editor<span class="muRecipe"> -> </span><a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, <a href='../084console.mu.html#L23'>console</a>:&:<a href='../084console.mu.html#L23'>console</a>, editor:&:editor [ <span id="L17" class="LineNr"> 17 </span> <span class="Constant">local-scope</span> -<span id="L18" class="LineNr"> 18 </span> <span class="Constant">load-ingredients</span> +<span id="L18" class="LineNr"> 18 </span> <span class="Constant">load-inputs</span> <span id="L19" class="LineNr"> 19 </span> <span class="Delimiter">{</span> <span id="L20" class="LineNr"> 20 </span> <span class="Conceal">¦</span> <span class="Comment"># looping over each (keyboard or touch) event as it occurs</span> <span id="L21" class="LineNr"> 21 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> +next-event</span> @@ -112,7 +112,7 @@ if ('onhashchange' in window) { <span id="L49" class="LineNr"> 49 </span><span class="Comment"># process click, return if it was on current editor</span> <span id="L50" class="LineNr"> 50 </span><span class="muRecipe">def</span> move-cursor editor:&:editor, <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, t:<a href='../084console.mu.html#L12'>touch-event</a><span class="muRecipe"> -> </span>in-focus?:bool, editor:&:editor [ <span id="L51" class="LineNr"> 51 </span> <span class="Constant">local-scope</span> -<span id="L52" class="LineNr"> 52 </span> <span class="Constant">load-ingredients</span> +<span id="L52" class="LineNr"> 52 </span> <span class="Constant">load-inputs</span> <span id="L53" class="LineNr"> 53 </span> <span class="muControl">return-unless</span> editor, <span class="Constant">0/false</span> <span id="L54" class="LineNr"> 54 </span> click-row:num <span class="Special"><-</span> get t, <span class="Constant">row:offset</span> <span id="L55" class="LineNr"> 55 </span> <span class="muControl">return-unless</span> click-row, <span class="Constant">0/false</span> <span class="Comment"># ignore clicks on 'menu'</span> @@ -137,7 +137,7 @@ if ('onhashchange' in window) { <span id="L74" class="LineNr"> 74 </span><span class="Comment"># past the last line it positions at end of last line.</span> <span id="L75" class="LineNr"> 75 </span><span class="muRecipe">def</span> <a href='002-typing.mu.html#L75'>snap-cursor</a> editor:&:editor, <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, target-row:num, target-column:num<span class="muRecipe"> -> </span>editor:&:editor [ <span id="L76" class="LineNr"> 76 </span> <span class="Constant">local-scope</span> -<span id="L77" class="LineNr"> 77 </span> <span class="Constant">load-ingredients</span> +<span id="L77" class="LineNr"> 77 </span> <span class="Constant">load-inputs</span> <span id="L78" class="LineNr"> 78 </span> <span class="muControl">return-unless</span> editor <span id="L79" class="LineNr"> 79 </span> left:num <span class="Special"><-</span> get *editor, <span class="Constant">left:offset</span> <span id="L80" class="LineNr"> 80 </span> right:num <span class="Special"><-</span> get *editor, <span class="Constant">right:offset</span> @@ -228,7 +228,7 @@ if ('onhashchange' in window) { <span id="L165" class="LineNr"> 165 </span><span class="Comment"># Set 'go-render?' to true to indicate the caller must perform a non-minimal update.</span> <span id="L166" class="LineNr"> 166 </span><span class="muRecipe">def</span> <a href='002-typing.mu.html#L166'>handle-keyboard-event</a> <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, editor:&:editor, e:<a href='../084console.mu.html#L4'>event</a><span class="muRecipe"> -> </span>go-render?:bool, <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, editor:&:editor [ <span id="L167" class="LineNr"> 167 </span> <span class="Constant">local-scope</span> -<span id="L168" class="LineNr"> 168 </span> <span class="Constant">load-ingredients</span> +<span id="L168" class="LineNr"> 168 </span> <span class="Constant">load-inputs</span> <span id="L169" class="LineNr"> 169 </span> <span class="muControl">return-unless</span> editor, <span class="Constant">0/don't-render</span> <span id="L170" class="LineNr"> 170 </span> <a href='../081print.mu.html#L768'>screen-width</a>:num <span class="Special"><-</span> <a href='../081print.mu.html#L768'>screen-width</a> <a href='../081print.mu.html#L16'>screen</a> <span id="L171" class="LineNr"> 171 </span> <a href='../081print.mu.html#L782'>screen-height</a>:num <span class="Special"><-</span> <a href='../081print.mu.html#L782'>screen-height</a> <a href='../081print.mu.html#L16'>screen</a> @@ -265,7 +265,7 @@ if ('onhashchange' in window) { <span id="L202" class="LineNr"> 202 </span> <span id="L203" class="LineNr"> 203 </span><span class="muRecipe">def</span> <a href='002-typing.mu.html#L203'>insert-at-cursor</a> editor:&:editor, c:char, <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a><span class="muRecipe"> -> </span>go-render?:bool, editor:&:editor, <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a> [ <span id="L204" class="LineNr"> 204 </span> <span class="Constant">local-scope</span> -<span id="L205" class="LineNr"> 205 </span> <span class="Constant">load-ingredients</span> +<span id="L205" class="LineNr"> 205 </span> <span class="Constant">load-inputs</span> <span id="L206" class="LineNr"> 206 </span> before-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> <span id="L207" class="LineNr"> 207 </span> insert c, before-cursor <span id="L208" class="LineNr"> 208 </span> before-cursor <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> before-cursor @@ -327,7 +327,7 @@ if ('onhashchange' in window) { <span id="L264" class="LineNr"> 264 </span><span class="Comment"># helper for tests</span> <span id="L265" class="LineNr"> 265 </span><span class="muRecipe">def</span> <a href='002-typing.mu.html#L265'>editor-render</a> <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, editor:&:editor<span class="muRecipe"> -> </span><a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, editor:&:editor [ <span id="L266" class="LineNr"> 266 </span> <span class="Constant">local-scope</span> -<span id="L267" class="LineNr"> 267 </span> <span class="Constant">load-ingredients</span> +<span id="L267" class="LineNr"> 267 </span> <span class="Constant">load-inputs</span> <span id="L268" class="LineNr"> 268 </span> old-top-idx:num <span class="Special"><-</span> <a href='../081print.mu.html#L509'>save-top-idx</a> <a href='../081print.mu.html#L16'>screen</a> <span id="L269" class="LineNr"> 269 </span> left:num <span class="Special"><-</span> get *editor, <span class="Constant">left:offset</span> <span id="L270" class="LineNr"> 270 </span> right:num <span class="Special"><-</span> get *editor, <span class="Constant">right:offset</span> @@ -930,7 +930,7 @@ if ('onhashchange' in window) { <span id="L867" class="LineNr"> 867 </span> <span id="L868" class="LineNr"> 868 </span><span class="muRecipe">def</span> <a href='002-typing.mu.html#L868'>insert-new-line-and-indent</a> editor:&:editor, <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a><span class="muRecipe"> -> </span>editor:&:editor, <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a> [ <span id="L869" class="LineNr"> 869 </span> <span class="Constant">local-scope</span> -<span id="L870" class="LineNr"> 870 </span> <span class="Constant">load-ingredients</span> +<span id="L870" class="LineNr"> 870 </span> <span class="Constant">load-inputs</span> <span id="L871" class="LineNr"> 871 </span> cursor-row:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-row:offset</span> <span id="L872" class="LineNr"> 872 </span> cursor-column:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-column:offset</span> <span id="L873" class="LineNr"> 873 </span> before-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> @@ -976,7 +976,7 @@ if ('onhashchange' in window) { <span id="L913" class="LineNr"> 913 </span> <span id="L914" class="LineNr"> 914 </span><span class="muRecipe">def</span> <a href='002-typing.mu.html#L914'>at-start-of-wrapped-line?</a> editor:&:editor<span class="muRecipe"> -> </span>result:bool [ <span id="L915" class="LineNr"> 915 </span> <span class="Constant">local-scope</span> -<span id="L916" class="LineNr"> 916 </span> <span class="Constant">load-ingredients</span> +<span id="L916" class="LineNr"> 916 </span> <span class="Constant">load-inputs</span> <span id="L917" class="LineNr"> 917 </span> left:num <span class="Special"><-</span> get *editor, <span class="Constant">left:offset</span> <span id="L918" class="LineNr"> 918 </span> cursor-column:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-column:offset</span> <span id="L919" class="LineNr"> 919 </span> cursor-at-left?:bool <span class="Special"><-</span> equal cursor-column, left @@ -996,7 +996,7 @@ if ('onhashchange' in window) { <span id="L933" class="LineNr"> 933 </span><span class="Comment"># the number of spaces at the start of the line containing 'curr'.</span> <span id="L934" class="LineNr"> 934 </span><span class="muRecipe">def</span> <a href='002-typing.mu.html#L934'>line-indent</a> curr:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char, start:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char<span class="muRecipe"> -> </span>result:num [ <span id="L935" class="LineNr"> 935 </span> <span class="Constant">local-scope</span> -<span id="L936" class="LineNr"> 936 </span> <span class="Constant">load-ingredients</span> +<span id="L936" class="LineNr"> 936 </span> <span class="Constant">load-inputs</span> <span id="L937" class="LineNr"> 937 </span> result:num <span class="Special"><-</span> copy<span class="Constant"> 0</span> <span id="L938" class="LineNr"> 938 </span> <span class="muControl">return-unless</span> curr <span id="L939" class="LineNr"> 939 </span> at-start?:bool <span class="Special"><-</span> equal curr, start @@ -1178,22 +1178,22 @@ if ('onhashchange' in window) { <span id="L1115" class="LineNr">1115 </span> <span id="L1116" class="LineNr">1116 </span><span class="muRecipe">def</span> <a href='002-typing.mu.html#L1116'>draw-horizontal</a> <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, row:num, x:num, right:num<span class="muRecipe"> -> </span><a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a> [ <span id="L1117" class="LineNr">1117 </span> <span class="Constant">local-scope</span> -<span id="L1118" class="LineNr">1118 </span> <span class="Constant">load-ingredients</span> +<span id="L1118" class="LineNr">1118 </span> <span class="Constant">load-inputs</span> <span id="L1119" class="LineNr">1119 </span> height:num <span class="Special"><-</span> <a href='../081print.mu.html#L782'>screen-height</a> <a href='../081print.mu.html#L16'>screen</a> <span id="L1120" class="LineNr">1120 </span> past-bottom?:bool <span class="Special"><-</span> greater-or-equal row, height <span id="L1121" class="LineNr">1121 </span> <span class="muControl">return-if</span> past-bottom? -<span id="L1122" class="LineNr">1122 </span> style:char, style-found?:bool <span class="Special"><-</span> <span class="Constant">next-ingredient</span> +<span id="L1122" class="LineNr">1122 </span> style:char, style-found?:bool <span class="Special"><-</span> <span class="Constant">next-input</span> <span id="L1123" class="LineNr">1123 </span> <span class="Delimiter">{</span> <span id="L1124" class="LineNr">1124 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> style-found? <span id="L1125" class="LineNr">1125 </span> <span class="Conceal">¦</span> style <span class="Special"><-</span> copy <span class="Constant">9472/horizontal</span> <span id="L1126" class="LineNr">1126 </span> <span class="Delimiter">}</span> -<span id="L1127" class="LineNr">1127 </span> color:num, color-found?:bool <span class="Special"><-</span> <span class="Constant">next-ingredient</span> +<span id="L1127" class="LineNr">1127 </span> color:num, color-found?:bool <span class="Special"><-</span> <span class="Constant">next-input</span> <span id="L1128" class="LineNr">1128 </span> <span class="Delimiter">{</span> <span id="L1129" class="LineNr">1129 </span> <span class="Conceal">¦</span> <span class="Comment"># default color to white</span> <span id="L1130" class="LineNr">1130 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> color-found? <span id="L1131" class="LineNr">1131 </span> <span class="Conceal">¦</span> color <span class="Special"><-</span> copy <span class="Constant">245/grey</span> <span id="L1132" class="LineNr">1132 </span> <span class="Delimiter">}</span> -<span id="L1133" class="LineNr">1133 </span> bg-color:num, bg-color-found?:bool <span class="Special"><-</span> <span class="Constant">next-ingredient</span> +<span id="L1133" class="LineNr">1133 </span> bg-color:num, bg-color-found?:bool <span class="Special"><-</span> <span class="Constant">next-input</span> <span id="L1134" class="LineNr">1134 </span> <span class="Delimiter">{</span> <span id="L1135" class="LineNr">1135 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> bg-color-found? <span id="L1136" class="LineNr">1136 </span> <span class="Conceal">¦</span> bg-color <span class="Special"><-</span> copy <span class="Constant">0/black</span> diff --git a/html/edit/003-shortcuts.mu.html b/html/edit/003-shortcuts.mu.html index 4d24c08d..68459fda 100644 --- a/html/edit/003-shortcuts.mu.html +++ b/html/edit/003-shortcuts.mu.html @@ -170,7 +170,7 @@ if ('onhashchange' in window) { <span id="L108" class="LineNr"> 108 </span><span class="Comment"># backspaced-cell - value deleted (or 0 if nothing was deleted) so we can save it for undo, etc.</span> <span id="L109" class="LineNr"> 109 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L109'>delete-before-cursor</a> editor:&:editor, <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a><span class="muRecipe"> -> </span>go-render?:bool, backspaced-cell:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char, editor:&:editor, <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a> [ <span id="L110" class="LineNr"> 110 </span> <span class="Constant">local-scope</span> -<span id="L111" class="LineNr"> 111 </span> <span class="Constant">load-ingredients</span> +<span id="L111" class="LineNr"> 111 </span> <span class="Constant">load-inputs</span> <span id="L112" class="LineNr"> 112 </span> before-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> <span id="L113" class="LineNr"> 113 </span> data:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">data:offset</span> <span id="L114" class="LineNr"> 114 </span> <span class="Comment"># if at start of text (before-cursor at § sentinel), return</span> @@ -217,7 +217,7 @@ if ('onhashchange' in window) { <span id="L155" class="LineNr"> 155 </span> <span id="L156" class="LineNr"> 156 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L156'>move-cursor-coordinates-left</a> editor:&:editor<span class="muRecipe"> -> </span>go-render?:bool, editor:&:editor [ <span id="L157" class="LineNr"> 157 </span> <span class="Constant">local-scope</span> -<span id="L158" class="LineNr"> 158 </span> <span class="Constant">load-ingredients</span> +<span id="L158" class="LineNr"> 158 </span> <span class="Constant">load-inputs</span> <span id="L159" class="LineNr"> 159 </span> go-render?:bool <span class="Special"><-</span> copy <span class="Constant">0/false</span> <span id="L160" class="LineNr"> 160 </span> before-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> <span id="L161" class="LineNr"> 161 </span> cursor-row:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-row:offset</span> @@ -280,7 +280,7 @@ if ('onhashchange' in window) { <span id="L218" class="LineNr"> 218 </span><span class="Comment"># the length of the previous line before the 'curr' pointer.</span> <span id="L219" class="LineNr"> 219 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L219'>previous-line-length</a> curr:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char, start:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char<span class="muRecipe"> -> </span>result:num [ <span id="L220" class="LineNr"> 220 </span> <span class="Constant">local-scope</span> -<span id="L221" class="LineNr"> 221 </span> <span class="Constant">load-ingredients</span> +<span id="L221" class="LineNr"> 221 </span> <span class="Constant">load-inputs</span> <span id="L222" class="LineNr"> 222 </span> result:num <span class="Special"><-</span> copy<span class="Constant"> 0</span> <span id="L223" class="LineNr"> 223 </span> <span class="muControl">return-unless</span> curr <span id="L224" class="LineNr"> 224 </span> at-start?:bool <span class="Special"><-</span> equal curr, start @@ -434,7 +434,7 @@ if ('onhashchange' in window) { <span id="L372" class="LineNr"> 372 </span> <span id="L373" class="LineNr"> 373 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L373'>delete-at-cursor</a> editor:&:editor, <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a><span class="muRecipe"> -> </span>go-render?:bool, deleted-cell:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char, editor:&:editor, <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a> [ <span id="L374" class="LineNr"> 374 </span> <span class="Constant">local-scope</span> -<span id="L375" class="LineNr"> 375 </span> <span class="Constant">load-ingredients</span> +<span id="L375" class="LineNr"> 375 </span> <span class="Constant">load-inputs</span> <span id="L376" class="LineNr"> 376 </span> before-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> <span id="L377" class="LineNr"> 377 </span> data:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">data:offset</span> <span id="L378" class="LineNr"> 378 </span> deleted-cell:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> before-cursor @@ -514,7 +514,7 @@ if ('onhashchange' in window) { <span id="L452" class="LineNr"> 452 </span> <span id="L453" class="LineNr"> 453 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L453'>move-cursor-coordinates-right</a> editor:&:editor, <a href='../081print.mu.html#L782'>screen-height</a>:num<span class="muRecipe"> -> </span>go-render?:bool, editor:&:editor [ <span id="L454" class="LineNr"> 454 </span> <span class="Constant">local-scope</span> -<span id="L455" class="LineNr"> 455 </span> <span class="Constant">load-ingredients</span> +<span id="L455" class="LineNr"> 455 </span> <span class="Constant">load-inputs</span> <span id="L456" class="LineNr"> 456 </span> before-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor <span class="Constant">before-cursor:offset</span> <span id="L457" class="LineNr"> 457 </span> cursor-row:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-row:offset</span> <span id="L458" class="LineNr"> 458 </span> cursor-column:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-column:offset</span> @@ -1061,7 +1061,7 @@ if ('onhashchange' in window) { <span id="L999" class="LineNr"> 999 </span> <span id="L1000" class="LineNr">1000 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L1000'>move-to-previous-line</a> editor:&:editor<span class="muRecipe"> -> </span>go-render?:bool, editor:&:editor [ <span id="L1001" class="LineNr">1001 </span> <span class="Constant">local-scope</span> -<span id="L1002" class="LineNr">1002 </span> <span class="Constant">load-ingredients</span> +<span id="L1002" class="LineNr">1002 </span> <span class="Constant">load-inputs</span> <span id="L1003" class="LineNr">1003 </span> go-render?:bool <span class="Special"><-</span> copy <span class="Constant">0/false</span> <span id="L1004" class="LineNr">1004 </span> cursor-row:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-row:offset</span> <span id="L1005" class="LineNr">1005 </span> cursor-column:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-column:offset</span> @@ -1415,7 +1415,7 @@ if ('onhashchange' in window) { <span id="L1353" class="LineNr">1353 </span> <span id="L1354" class="LineNr">1354 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L1354'>move-to-next-line</a> editor:&:editor, <a href='../081print.mu.html#L782'>screen-height</a>:num<span class="muRecipe"> -> </span>go-render?:bool, editor:&:editor [ <span id="L1355" class="LineNr">1355 </span> <span class="Constant">local-scope</span> -<span id="L1356" class="LineNr">1356 </span> <span class="Constant">load-ingredients</span> +<span id="L1356" class="LineNr">1356 </span> <span class="Constant">load-inputs</span> <span id="L1357" class="LineNr">1357 </span> cursor-row:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-row:offset</span> <span id="L1358" class="LineNr">1358 </span> cursor-column:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-column:offset</span> <span id="L1359" class="LineNr">1359 </span> before-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> @@ -1626,7 +1626,7 @@ if ('onhashchange' in window) { <span id="L1564" class="LineNr">1564 </span><span class="Comment"># precondition: cursor-column should be in a consistent state</span> <span id="L1565" class="LineNr">1565 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L1565'>move-to-start-of-screen-line</a> editor:&:editor<span class="muRecipe"> -> </span>editor:&:editor [ <span id="L1566" class="LineNr">1566 </span> <span class="Constant">local-scope</span> -<span id="L1567" class="LineNr">1567 </span> <span class="Constant">load-ingredients</span> +<span id="L1567" class="LineNr">1567 </span> <span class="Constant">load-inputs</span> <span id="L1568" class="LineNr">1568 </span> <span class="Comment"># update cursor column</span> <span id="L1569" class="LineNr">1569 </span> left:num <span class="Special"><-</span> get *editor, <span class="Constant">left:offset</span> <span id="L1570" class="LineNr">1570 </span> col:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-column:offset</span> @@ -1849,7 +1849,7 @@ if ('onhashchange' in window) { <span id="L1787" class="LineNr">1787 </span> <span id="L1788" class="LineNr">1788 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L1788'>move-to-end-of-line</a> editor:&:editor<span class="muRecipe"> -> </span>editor:&:editor [ <span id="L1789" class="LineNr">1789 </span> <span class="Constant">local-scope</span> -<span id="L1790" class="LineNr">1790 </span> <span class="Constant">load-ingredients</span> +<span id="L1790" class="LineNr">1790 </span> <span class="Constant">load-inputs</span> <span id="L1791" class="LineNr">1791 </span> before-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> <span id="L1792" class="LineNr">1792 </span> cursor-column:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-column:offset</span> <span id="L1793" class="LineNr">1793 </span> right:num <span class="Special"><-</span> get *editor, <span class="Constant">right:offset</span> @@ -2032,7 +2032,7 @@ if ('onhashchange' in window) { <span id="L1970" class="LineNr">1970 </span> <span id="L1971" class="LineNr">1971 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L1971'>minimal-render-for-ctrl-u</a> <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, editor:&:editor, deleted-cells:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char<span class="muRecipe"> -> </span>go-render?:bool, <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a> [ <span id="L1972" class="LineNr">1972 </span> <span class="Constant">local-scope</span> -<span id="L1973" class="LineNr">1973 </span> <span class="Constant">load-ingredients</span> +<span id="L1973" class="LineNr">1973 </span> <span class="Constant">load-inputs</span> <span id="L1974" class="LineNr">1974 </span> curr-column:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-column:offset</span> <span id="L1975" class="LineNr">1975 </span> <span class="Comment"># accumulate the current line as text and render it</span> <span id="L1976" class="LineNr">1976 </span> buf:&:<a href='../061text.mu.html#L120'>buffer</a>:char <span class="Special"><-</span> <a href='../061text.mu.html#L125'>new-buffer</a><span class="Constant"> 30</span> <span class="Comment"># accumulator for the text we need to render</span> @@ -2067,7 +2067,7 @@ if ('onhashchange' in window) { <span id="L2005" class="LineNr">2005 </span> <span id="L2006" class="LineNr">2006 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L2006'>delete-to-start-of-line</a> editor:&:editor<span class="muRecipe"> -> </span>result:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char, editor:&:editor [ <span id="L2007" class="LineNr">2007 </span> <span class="Constant">local-scope</span> -<span id="L2008" class="LineNr">2008 </span> <span class="Constant">load-ingredients</span> +<span id="L2008" class="LineNr">2008 </span> <span class="Constant">load-inputs</span> <span id="L2009" class="LineNr">2009 </span> <span class="Comment"># compute range to delete</span> <span id="L2010" class="LineNr">2010 </span> init:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">data:offset</span> <span id="L2011" class="LineNr">2011 </span> top-of-screen:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> @@ -2123,7 +2123,7 @@ if ('onhashchange' in window) { <span id="L2061" class="LineNr">2061 </span> <span id="L2062" class="LineNr">2062 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L2062'>render-code</a> <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, s:text, left:num, right:num, row:num<span class="muRecipe"> -> </span>row:num, <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a> [ <span id="L2063" class="LineNr">2063 </span> <span class="Constant">local-scope</span> -<span id="L2064" class="LineNr">2064 </span> <span class="Constant">load-ingredients</span> +<span id="L2064" class="LineNr">2064 </span> <span class="Constant">load-inputs</span> <span id="L2065" class="LineNr">2065 </span> <span class="muControl">return-unless</span> s <span id="L2066" class="LineNr">2066 </span> color:num <span class="Special"><-</span> copy <span class="Constant">7/white</span> <span id="L2067" class="LineNr">2067 </span> column:num <span class="Special"><-</span> copy left @@ -2610,7 +2610,7 @@ if ('onhashchange' in window) { <span id="L2548" class="LineNr">2548 </span> <span id="L2549" class="LineNr">2549 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L2549'>minimal-render-for-ctrl-k</a> <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, editor:&:editor, deleted-cells:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char<span class="muRecipe"> -> </span>go-render?:bool, <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a> [ <span id="L2550" class="LineNr">2550 </span> <span class="Constant">local-scope</span> -<span id="L2551" class="LineNr">2551 </span> <span class="Constant">load-ingredients</span> +<span id="L2551" class="LineNr">2551 </span> <span class="Constant">load-inputs</span> <span id="L2552" class="LineNr">2552 </span> <span class="Comment"># if we deleted nothing, there's nothing to render</span> <span id="L2553" class="LineNr">2553 </span> <span class="muControl">return-unless</span> deleted-cells, <span class="Constant">0/dont-render</span> <span id="L2554" class="LineNr">2554 </span> <span class="Comment"># if the line used to wrap before, give up and render the whole screen</span> @@ -2628,7 +2628,7 @@ if ('onhashchange' in window) { <span id="L2566" class="LineNr">2566 </span> <span id="L2567" class="LineNr">2567 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L2567'>delete-to-end-of-line</a> editor:&:editor<span class="muRecipe"> -> </span>result:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char, editor:&:editor [ <span id="L2568" class="LineNr">2568 </span> <span class="Constant">local-scope</span> -<span id="L2569" class="LineNr">2569 </span> <span class="Constant">load-ingredients</span> +<span id="L2569" class="LineNr">2569 </span> <span class="Constant">load-inputs</span> <span id="L2570" class="LineNr">2570 </span> <span class="Comment"># compute range to delete</span> <span id="L2571" class="LineNr">2571 </span> start:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> <span id="L2572" class="LineNr">2572 </span> end:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> start @@ -2865,7 +2865,7 @@ if ('onhashchange' in window) { <span id="L2803" class="LineNr">2803 </span><span class="Comment"># Beware: never return null pointer.</span> <span id="L2804" class="LineNr">2804 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L2804'>before-start-of-next-line</a> original:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char, max:num<span class="muRecipe"> -> </span>curr:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char [ <span id="L2805" class="LineNr">2805 </span> <span class="Constant">local-scope</span> -<span id="L2806" class="LineNr">2806 </span> <span class="Constant">load-ingredients</span> +<span id="L2806" class="LineNr">2806 </span> <span class="Constant">load-inputs</span> <span id="L2807" class="LineNr">2807 </span> count:num <span class="Special"><-</span> copy<span class="Constant"> 0</span> <span id="L2808" class="LineNr">2808 </span> curr:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> copy original <span id="L2809" class="LineNr">2809 </span> <span class="Comment"># skip the initial newline if it exists</span> @@ -3236,7 +3236,7 @@ if ('onhashchange' in window) { <span id="L3174" class="LineNr">3174 </span><span class="Comment"># Beware: never return null pointer.</span> <span id="L3175" class="LineNr">3175 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L3175'>before-previous-screen-line</a> in:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char, editor:&:editor<span class="muRecipe"> -> </span>out:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char [ <span id="L3176" class="LineNr">3176 </span> <span class="Constant">local-scope</span> -<span id="L3177" class="LineNr">3177 </span> <span class="Constant">load-ingredients</span> +<span id="L3177" class="LineNr">3177 </span> <span class="Constant">load-inputs</span> <span id="L3178" class="LineNr">3178 </span> curr:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> copy in <span id="L3179" class="LineNr">3179 </span> c:char <span class="Special"><-</span> get *curr, <span class="Constant">value:offset</span> <span id="L3180" class="LineNr">3180 </span> <span class="Comment"># compute max, number of characters to skip</span> @@ -3658,7 +3658,7 @@ if ('onhashchange' in window) { <span id="L3596" class="LineNr">3596 </span><span class="Comment"># taking up the entire screen</span> <span id="L3597" class="LineNr">3597 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L3597'>page-down</a> editor:&:editor<span class="muRecipe"> -> </span>editor:&:editor [ <span id="L3598" class="LineNr">3598 </span> <span class="Constant">local-scope</span> -<span id="L3599" class="LineNr">3599 </span> <span class="Constant">load-ingredients</span> +<span id="L3599" class="LineNr">3599 </span> <span class="Constant">load-inputs</span> <span id="L3600" class="LineNr">3600 </span> <span class="Comment"># if editor contents don't overflow screen, do nothing</span> <span id="L3601" class="LineNr">3601 </span> bottom-of-screen:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">bottom-of-screen:offset</span> <span id="L3602" class="LineNr">3602 </span> <span class="muControl">return-unless</span> bottom-of-screen @@ -3683,7 +3683,7 @@ if ('onhashchange' in window) { <span id="L3621" class="LineNr">3621 </span><span class="Comment"># jump to previous newline</span> <span id="L3622" class="LineNr">3622 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L3622'>move-to-start-of-line</a> editor:&:editor<span class="muRecipe"> -> </span>editor:&:editor [ <span id="L3623" class="LineNr">3623 </span> <span class="Constant">local-scope</span> -<span id="L3624" class="LineNr">3624 </span> <span class="Constant">load-ingredients</span> +<span id="L3624" class="LineNr">3624 </span> <span class="Constant">load-inputs</span> <span id="L3625" class="LineNr">3625 </span> <span class="Comment"># update cursor column</span> <span id="L3626" class="LineNr">3626 </span> left:num <span class="Special"><-</span> get *editor, <span class="Constant">left:offset</span> <span id="L3627" class="LineNr">3627 </span> cursor-column:num <span class="Special"><-</span> copy left @@ -3881,7 +3881,7 @@ if ('onhashchange' in window) { <span id="L3819" class="LineNr">3819 </span> <span id="L3820" class="LineNr">3820 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L3820'>page-up</a> editor:&:editor, <a href='../081print.mu.html#L782'>screen-height</a>:num<span class="muRecipe"> -> </span>editor:&:editor [ <span id="L3821" class="LineNr">3821 </span> <span class="Constant">local-scope</span> -<span id="L3822" class="LineNr">3822 </span> <span class="Constant">load-ingredients</span> +<span id="L3822" class="LineNr">3822 </span> <span class="Constant">load-inputs</span> <span id="L3823" class="LineNr">3823 </span> max:num <span class="Special"><-</span> subtract <a href='../081print.mu.html#L782'>screen-height</a>, <span class="Constant">1/menu-bar</span>, <span class="Constant">1/overlapping-line</span> <span id="L3824" class="LineNr">3824 </span> count:num <span class="Special"><-</span> copy<span class="Constant"> 0</span> <span id="L3825" class="LineNr">3825 </span> top-of-screen:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> @@ -4210,7 +4210,7 @@ if ('onhashchange' in window) { <span id="L4148" class="LineNr">4148 </span> <span id="L4149" class="LineNr">4149 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L4149'>line-up</a> editor:&:editor, <a href='../081print.mu.html#L782'>screen-height</a>:num<span class="muRecipe"> -> </span>go-render?:bool, editor:&:editor [ <span id="L4150" class="LineNr">4150 </span> <span class="Constant">local-scope</span> -<span id="L4151" class="LineNr">4151 </span> <span class="Constant">load-ingredients</span> +<span id="L4151" class="LineNr">4151 </span> <span class="Constant">load-inputs</span> <span id="L4152" class="LineNr">4152 </span> left:num <span class="Special"><-</span> get *editor, <span class="Constant">left:offset</span> <span id="L4153" class="LineNr">4153 </span> right:num <span class="Special"><-</span> get *editor, <span class="Constant">right:offset</span> <span id="L4154" class="LineNr">4154 </span> max:num <span class="Special"><-</span> subtract right, left @@ -4241,7 +4241,7 @@ if ('onhashchange' in window) { <span id="L4179" class="LineNr">4179 </span> <span id="L4180" class="LineNr">4180 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L4180'>line-down</a> editor:&:editor, <a href='../081print.mu.html#L782'>screen-height</a>:num<span class="muRecipe"> -> </span>go-render?:bool, editor:&:editor [ <span id="L4181" class="LineNr">4181 </span> <span class="Constant">local-scope</span> -<span id="L4182" class="LineNr">4182 </span> <span class="Constant">load-ingredients</span> +<span id="L4182" class="LineNr">4182 </span> <span class="Constant">load-inputs</span> <span id="L4183" class="LineNr">4183 </span> old-top:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L4184" class="LineNr">4184 </span> new-top:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L3175'>before-previous-screen-line</a> old-top, editor <span id="L4185" class="LineNr">4185 </span> movement?:bool <span class="Special"><-</span> not-equal old-top, new-top @@ -4311,7 +4311,7 @@ if ('onhashchange' in window) { <span id="L4249" class="LineNr">4249 </span><span class="Comment"># the caller to go-render? the entire screen.</span> <span id="L4250" class="LineNr">4250 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L4250'>render-line-from-start</a> <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, editor:&:editor, right-margin:num<span class="muRecipe"> -> </span>go-render?:bool, <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a> [ <span id="L4251" class="LineNr">4251 </span> <span class="Constant">local-scope</span> -<span id="L4252" class="LineNr">4252 </span> <span class="Constant">load-ingredients</span> +<span id="L4252" class="LineNr">4252 </span> <span class="Constant">load-inputs</span> <span id="L4253" class="LineNr">4253 </span> before-line-start:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L4280'>before-start-of-screen-line</a> editor <span id="L4254" class="LineNr">4254 </span> line-start:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> before-line-start <span id="L4255" class="LineNr">4255 </span> color:num <span class="Special"><-</span> copy <span class="Constant">7/white</span> @@ -4341,7 +4341,7 @@ if ('onhashchange' in window) { <span id="L4279" class="LineNr">4279 </span> <span id="L4280" class="LineNr">4280 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L4280'>before-start-of-screen-line</a> editor:&:editor<span class="muRecipe"> -> </span>result:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char [ <span id="L4281" class="LineNr">4281 </span> <span class="Constant">local-scope</span> -<span id="L4282" class="LineNr">4282 </span> <span class="Constant">load-ingredients</span> +<span id="L4282" class="LineNr">4282 </span> <span class="Constant">load-inputs</span> <span id="L4283" class="LineNr">4283 </span> cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> <span id="L4284" class="LineNr">4284 </span> <span class="Delimiter">{</span> <span id="L4285" class="LineNr">4285 </span> <span class="Conceal">¦</span> <a href='../065duplex_list.mu.html#L25'>next</a>:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> cursor diff --git a/html/edit/004-programming-environment.mu.html b/html/edit/004-programming-environment.mu.html index 6179ca5e..703e71e6 100644 --- a/html/edit/004-programming-environment.mu.html +++ b/html/edit/004-programming-environment.mu.html @@ -83,7 +83,7 @@ if ('onhashchange' in window) { <span id="L20" class="LineNr"> 20 </span> <span id="L21" class="LineNr"> 21 </span><span class="muRecipe">def</span> <a href='004-programming-environment.mu.html#L21'>new-programming-environment</a> <a href='../088file.mu.html#L11'>resources</a>:&:<a href='../088file.mu.html#L11'>resources</a>, <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, test-sandbox-editor-contents:text<span class="muRecipe"> -> </span>result:&:environment [ <span id="L22" class="LineNr"> 22 </span> <span class="Constant">local-scope</span> -<span id="L23" class="LineNr"> 23 </span> <span class="Constant">load-ingredients</span> +<span id="L23" class="LineNr"> 23 </span> <span class="Constant">load-inputs</span> <span id="L24" class="LineNr"> 24 </span> width:num <span class="Special"><-</span> <a href='../081print.mu.html#L768'>screen-width</a> <a href='../081print.mu.html#L16'>screen</a> <span id="L25" class="LineNr"> 25 </span> result <span class="Special"><-</span> new <span class="Constant">environment:type</span> <span id="L26" class="LineNr"> 26 </span> <span class="Comment"># recipe editor on the left</span> @@ -101,7 +101,7 @@ if ('onhashchange' in window) { <span id="L38" class="LineNr"> 38 </span> <span id="L39" class="LineNr"> 39 </span><span class="muRecipe">def</span> <a href='004-programming-environment.mu.html#L39'>event-loop</a> <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, <a href='../084console.mu.html#L23'>console</a>:&:<a href='../084console.mu.html#L23'>console</a>, env:&:environment, <a href='../088file.mu.html#L11'>resources</a>:&:<a href='../088file.mu.html#L11'>resources</a><span class="muRecipe"> -> </span><a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, <a href='../084console.mu.html#L23'>console</a>:&:<a href='../084console.mu.html#L23'>console</a>, env:&:environment, <a href='../088file.mu.html#L11'>resources</a>:&:<a href='../088file.mu.html#L11'>resources</a> [ <span id="L40" class="LineNr"> 40 </span> <span class="Constant">local-scope</span> -<span id="L41" class="LineNr"> 41 </span> <span class="Constant">load-ingredients</span> +<span id="L41" class="LineNr"> 41 </span> <span class="Constant">load-inputs</span> <span id="L42" class="LineNr"> 42 </span> recipes:&:editor <span class="Special"><-</span> get *env, <span class="Constant">recipes:offset</span> <span id="L43" class="LineNr"> 43 </span> current-sandbox:&:editor <span class="Special"><-</span> get *env, <span class="Constant">current-sandbox:offset</span> <span id="L44" class="LineNr"> 44 </span> sandbox-in-focus?:bool <span class="Special"><-</span> get *env, <span class="Constant">sandbox-in-focus?:offset</span> @@ -193,7 +193,7 @@ if ('onhashchange' in window) { <span id="L130" class="LineNr">130 </span> <span id="L131" class="LineNr">131 </span><span class="muRecipe">def</span> <a href='004-programming-environment.mu.html#L131'>resize</a> <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, env:&:environment<span class="muRecipe"> -> </span>env:&:environment, <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a> [ <span id="L132" class="LineNr">132 </span> <span class="Constant">local-scope</span> -<span id="L133" class="LineNr">133 </span> <span class="Constant">load-ingredients</span> +<span id="L133" class="LineNr">133 </span> <span class="Constant">load-inputs</span> <span id="L134" class="LineNr">134 </span> <a href='../081print.mu.html#L46'>clear-screen</a> <a href='../081print.mu.html#L16'>screen</a> <span class="Comment"># update screen dimensions</span> <span id="L135" class="LineNr">135 </span> width:num <span class="Special"><-</span> <a href='../081print.mu.html#L768'>screen-width</a> <a href='../081print.mu.html#L16'>screen</a> <span id="L136" class="LineNr">136 </span> divider:num, _ <span class="Special"><-</span> divide-with-remainder width,<span class="Constant"> 2</span> @@ -220,7 +220,7 @@ if ('onhashchange' in window) { <span id="L157" class="LineNr">157 </span><span class="Comment"># off-screen, it resets cursor-row and cursor-column.</span> <span id="L158" class="LineNr">158 </span><span class="muRecipe">def</span> <a href='004-programming-environment.mu.html#L158'>render-without-moving-cursor</a> <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, editor:&:editor<span class="muRecipe"> -> </span>last-row:num, last-column:num, <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, editor:&:editor [ <span id="L159" class="LineNr">159 </span> <span class="Constant">local-scope</span> -<span id="L160" class="LineNr">160 </span> <span class="Constant">load-ingredients</span> +<span id="L160" class="LineNr">160 </span> <span class="Constant">load-inputs</span> <span id="L161" class="LineNr">161 </span> <span class="muControl">return-unless</span> editor, <span class="Constant">1/top</span>, <span class="Constant">0/left</span> <span id="L162" class="LineNr">162 </span> left:num <span class="Special"><-</span> get *editor, <span class="Constant">left:offset</span> <span id="L163" class="LineNr">163 </span> <a href='../081print.mu.html#L782'>screen-height</a>:num <span class="Special"><-</span> <a href='../081print.mu.html#L782'>screen-height</a> <a href='../081print.mu.html#L16'>screen</a> @@ -464,7 +464,7 @@ if ('onhashchange' in window) { <span id="L401" class="LineNr">401 </span> <span id="L402" class="LineNr">402 </span><span class="muRecipe">def</span> <a href='004-programming-environment.mu.html#L402'>render-all</a> <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, env:&:environment, render-editor:<a href='004-programming-environment.mu.html#L400'>render-recipe</a><span class="muRecipe"> -> </span><a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, env:&:environment [ <span id="L403" class="LineNr">403 </span> <span class="Constant">local-scope</span> -<span id="L404" class="LineNr">404 </span> <span class="Constant">load-ingredients</span> +<span id="L404" class="LineNr">404 </span> <span class="Constant">load-inputs</span> <span id="L405" class="LineNr">405 </span> trace<span class="Constant"> 10</span>, <span class="Constant">[app]</span>, <span class="Constant">[render all]</span> <span id="L406" class="LineNr">406 </span> <span class="Comment"># top menu</span> <span id="L407" class="LineNr">407 </span> trace<span class="Constant"> 11</span>, <span class="Constant">[app]</span>, <span class="Constant">[render top menu]</span> @@ -493,7 +493,7 @@ if ('onhashchange' in window) { <span id="L430" class="LineNr">430 </span> <span id="L431" class="LineNr">431 </span><span class="muRecipe">def</span> <a href='004-programming-environment.mu.html#L431'>render-recipes</a> <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, env:&:environment, render-editor:<a href='004-programming-environment.mu.html#L400'>render-recipe</a><span class="muRecipe"> -> </span><a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, env:&:environment [ <span id="L432" class="LineNr">432 </span> <span class="Constant">local-scope</span> -<span id="L433" class="LineNr">433 </span> <span class="Constant">load-ingredients</span> +<span id="L433" class="LineNr">433 </span> <span class="Constant">load-inputs</span> <span id="L434" class="LineNr">434 </span> trace<span class="Constant"> 11</span>, <span class="Constant">[app]</span>, <span class="Constant">[render recipes]</span> <span id="L435" class="LineNr">435 </span> old-top-idx:num <span class="Special"><-</span> <a href='../081print.mu.html#L509'>save-top-idx</a> <a href='../081print.mu.html#L16'>screen</a> <span id="L436" class="LineNr">436 </span> recipes:&:editor <span class="Special"><-</span> get *env, <span class="Constant">recipes:offset</span> @@ -515,7 +515,7 @@ if ('onhashchange' in window) { <span id="L452" class="LineNr">452 </span><span class="Comment"># replaced in a later layer</span> <span id="L453" class="LineNr">453 </span><span class="muRecipe">def</span> render-sandbox-side <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, env:&:environment, render-editor:<a href='004-programming-environment.mu.html#L400'>render-recipe</a><span class="muRecipe"> -> </span><a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, env:&:environment [ <span id="L454" class="LineNr">454 </span> <span class="Constant">local-scope</span> -<span id="L455" class="LineNr">455 </span> <span class="Constant">load-ingredients</span> +<span id="L455" class="LineNr">455 </span> <span class="Constant">load-inputs</span> <span id="L456" class="LineNr">456 </span> trace<span class="Constant"> 11</span>, <span class="Constant">[app]</span>, <span class="Constant">[render sandboxes]</span> <span id="L457" class="LineNr">457 </span> old-top-idx:num <span class="Special"><-</span> <a href='../081print.mu.html#L509'>save-top-idx</a> <a href='../081print.mu.html#L16'>screen</a> <span id="L458" class="LineNr">458 </span> current-sandbox:&:editor <span class="Special"><-</span> get *env, <span class="Constant">current-sandbox:offset</span> @@ -534,7 +534,7 @@ if ('onhashchange' in window) { <span id="L471" class="LineNr">471 </span> <span id="L472" class="LineNr">472 </span><span class="muRecipe">def</span> <a href='004-programming-environment.mu.html#L472'>update-cursor</a> <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, recipes:&:editor, current-sandbox:&:editor, sandbox-in-focus?:bool, env:&:environment<span class="muRecipe"> -> </span><a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a> [ <span id="L473" class="LineNr">473 </span> <span class="Constant">local-scope</span> -<span id="L474" class="LineNr">474 </span> <span class="Constant">load-ingredients</span> +<span id="L474" class="LineNr">474 </span> <span class="Constant">load-inputs</span> <span id="L475" class="LineNr">475 </span><span class="Constant"> <a href='004-programming-environment.mu.html#L475'><update-cursor-special-cases></a></span> <span id="L476" class="LineNr">476 </span> <span class="Delimiter">{</span> <span id="L477" class="LineNr">477 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> sandbox-in-focus? @@ -568,13 +568,13 @@ if ('onhashchange' in window) { <span id="L505" class="LineNr">505 </span> <span id="L506" class="LineNr">506 </span><span class="muRecipe">def</span> <a href='004-programming-environment.mu.html#L506'>draw-vertical</a> <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, col:num, y:num, bottom:num<span class="muRecipe"> -> </span><a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a> [ <span id="L507" class="LineNr">507 </span> <span class="Constant">local-scope</span> -<span id="L508" class="LineNr">508 </span> <span class="Constant">load-ingredients</span> -<span id="L509" class="LineNr">509 </span> style:char, style-found?:bool <span class="Special"><-</span> <span class="Constant">next-ingredient</span> +<span id="L508" class="LineNr">508 </span> <span class="Constant">load-inputs</span> +<span id="L509" class="LineNr">509 </span> style:char, style-found?:bool <span class="Special"><-</span> <span class="Constant">next-input</span> <span id="L510" class="LineNr">510 </span> <span class="Delimiter">{</span> <span id="L511" class="LineNr">511 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> style-found? <span id="L512" class="LineNr">512 </span> <span class="Conceal">¦</span> style <span class="Special"><-</span> copy <span class="Constant">9474/vertical</span> <span id="L513" class="LineNr">513 </span> <span class="Delimiter">}</span> -<span id="L514" class="LineNr">514 </span> color:num, color-found?:bool <span class="Special"><-</span> <span class="Constant">next-ingredient</span> +<span id="L514" class="LineNr">514 </span> color:num, color-found?:bool <span class="Special"><-</span> <span class="Constant">next-input</span> <span id="L515" class="LineNr">515 </span> <span class="Delimiter">{</span> <span id="L516" class="LineNr">516 </span> <span class="Conceal">¦</span> <span class="Comment"># default color to white</span> <span id="L517" class="LineNr">517 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> color-found? diff --git a/html/edit/005-sandbox.mu.html b/html/edit/005-sandbox.mu.html index 1c6ab31c..51d920f8 100644 --- a/html/edit/005-sandbox.mu.html +++ b/html/edit/005-sandbox.mu.html @@ -208,7 +208,7 @@ if ('onhashchange' in window) { <span id="L145" class="LineNr"> 145 </span> <span id="L146" class="LineNr"> 146 </span><span class="muRecipe">def</span> <a href='005-sandbox.mu.html#L146'>run-sandboxes</a> env:&:environment, <a href='../088file.mu.html#L11'>resources</a>:&:<a href='../088file.mu.html#L11'>resources</a>, <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a><span class="muRecipe"> -> </span>errors-found?:bool, env:&:environment, <a href='../088file.mu.html#L11'>resources</a>:&:<a href='../088file.mu.html#L11'>resources</a>, <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a> [ <span id="L147" class="LineNr"> 147 </span> <span class="Constant">local-scope</span> -<span id="L148" class="LineNr"> 148 </span> <span class="Constant">load-ingredients</span> +<span id="L148" class="LineNr"> 148 </span> <span class="Constant">load-inputs</span> <span id="L149" class="LineNr"> 149 </span> errors-found?:bool <span class="Special"><-</span> update-recipes env, <a href='../088file.mu.html#L11'>resources</a>, <a href='../081print.mu.html#L16'>screen</a> <span id="L150" class="LineNr"> 150 </span> <span class="muControl">jump-if</span> errors-found?, <span class="Constant">+return</span> <span id="L151" class="LineNr"> 151 </span> <span class="Comment"># check contents of right editor (sandbox)</span> @@ -259,7 +259,7 @@ if ('onhashchange' in window) { <span id="L196" class="LineNr"> 196 </span><span class="Comment"># replaced in a later layer (whereupon errors-found? will actually be set)</span> <span id="L197" class="LineNr"> 197 </span><span class="muRecipe">def</span> update-recipes env:&:environment, <a href='../088file.mu.html#L11'>resources</a>:&:<a href='../088file.mu.html#L11'>resources</a>, <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a><span class="muRecipe"> -> </span>errors-found?:bool, env:&:environment, <a href='../088file.mu.html#L11'>resources</a>:&:<a href='../088file.mu.html#L11'>resources</a>, <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a> [ <span id="L198" class="LineNr"> 198 </span> <span class="Constant">local-scope</span> -<span id="L199" class="LineNr"> 199 </span> <span class="Constant">load-ingredients</span> +<span id="L199" class="LineNr"> 199 </span> <span class="Constant">load-inputs</span> <span id="L200" class="LineNr"> 200 </span> recipes:&:editor <span class="Special"><-</span> get *env, <span class="Constant">recipes:offset</span> <span id="L201" class="LineNr"> 201 </span> in:text <span class="Special"><-</span> <a href='005-sandbox.mu.html#L683'>editor-contents</a> recipes <span id="L202" class="LineNr"> 202 </span> <a href='../088file.mu.html#L11'>resources</a> <span class="Special"><-</span> <a href='../088file.mu.html#L127'>dump</a> <a href='../088file.mu.html#L11'>resources</a>, <span class="Constant">[lesson/recipes.mu]</span>, in @@ -270,7 +270,7 @@ if ('onhashchange' in window) { <span id="L207" class="LineNr"> 207 </span><span class="Comment"># replaced in a later layer</span> <span id="L208" class="LineNr"> 208 </span><span class="muRecipe">def</span> update-sandbox sandbox:&:sandbox, env:&:environment, idx:num<span class="muRecipe"> -> </span>sandbox:&:sandbox, env:&:environment [ <span id="L209" class="LineNr"> 209 </span> <span class="Constant">local-scope</span> -<span id="L210" class="LineNr"> 210 </span> <span class="Constant">load-ingredients</span> +<span id="L210" class="LineNr"> 210 </span> <span class="Constant">load-inputs</span> <span id="L211" class="LineNr"> 211 </span> data:text <span class="Special"><-</span> get *sandbox, <span class="Constant">data:offset</span> <span id="L212" class="LineNr"> 212 </span> response:text, _, fake-screen:&:<a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> run-sandboxed data <span id="L213" class="LineNr"> 213 </span> *sandbox <span class="Special"><-</span> put *sandbox, <span class="Constant">response:offset</span>, response @@ -279,14 +279,14 @@ if ('onhashchange' in window) { <span id="L216" class="LineNr"> 216 </span> <span id="L217" class="LineNr"> 217 </span><span class="muRecipe">def</span> <a href='005-sandbox.mu.html#L217'>update-status</a> <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, msg:text, color:num<span class="muRecipe"> -> </span><a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a> [ <span id="L218" class="LineNr"> 218 </span> <span class="Constant">local-scope</span> -<span id="L219" class="LineNr"> 219 </span> <span class="Constant">load-ingredients</span> +<span id="L219" class="LineNr"> 219 </span> <span class="Constant">load-inputs</span> <span id="L220" class="LineNr"> 220 </span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> move-cursor <a href='../081print.mu.html#L16'>screen</a>,<span class="Constant"> 0</span>,<span class="Constant"> 2</span> <span id="L221" class="LineNr"> 221 </span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> print <a href='../081print.mu.html#L16'>screen</a>, msg, color, <span class="Constant">238/grey/background</span> <span id="L222" class="LineNr"> 222 </span>] <span id="L223" class="LineNr"> 223 </span> <span id="L224" class="LineNr"> 224 </span><span class="muRecipe">def</span> <a href='005-sandbox.mu.html#L224'>save-sandboxes</a> env:&:environment, <a href='../088file.mu.html#L11'>resources</a>:&:<a href='../088file.mu.html#L11'>resources</a><span class="muRecipe"> -> </span><a href='../088file.mu.html#L11'>resources</a>:&:<a href='../088file.mu.html#L11'>resources</a> [ <span id="L225" class="LineNr"> 225 </span> <span class="Constant">local-scope</span> -<span id="L226" class="LineNr"> 226 </span> <span class="Constant">load-ingredients</span> +<span id="L226" class="LineNr"> 226 </span> <span class="Constant">load-inputs</span> <span id="L227" class="LineNr"> 227 </span> trace<span class="Constant"> 11</span>, <span class="Constant">[app]</span>, <span class="Constant">[save sandboxes]</span> <span id="L228" class="LineNr"> 228 </span> current-sandbox:&:editor <span class="Special"><-</span> get *env, <span class="Constant">current-sandbox:offset</span> <span id="L229" class="LineNr"> 229 </span> <span class="Comment"># first clear previous versions, in case we deleted some sandbox</span> @@ -304,7 +304,7 @@ if ('onhashchange' in window) { <span id="L241" class="LineNr"> 241 </span> <span id="L242" class="LineNr"> 242 </span><span class="muRecipe">def</span> <a href='005-sandbox.mu.html#L242'>save-sandbox</a> <a href='../088file.mu.html#L11'>resources</a>:&:<a href='../088file.mu.html#L11'>resources</a>, sandbox:&:sandbox, sandbox-index:num<span class="muRecipe"> -> </span><a href='../088file.mu.html#L11'>resources</a>:&:<a href='../088file.mu.html#L11'>resources</a> [ <span id="L243" class="LineNr"> 243 </span> <span class="Constant">local-scope</span> -<span id="L244" class="LineNr"> 244 </span> <span class="Constant">load-ingredients</span> +<span id="L244" class="LineNr"> 244 </span> <span class="Constant">load-inputs</span> <span id="L245" class="LineNr"> 245 </span> data:text <span class="Special"><-</span> get *sandbox, <span class="Constant">data:offset</span> <span id="L246" class="LineNr"> 246 </span> filename:text <span class="Special"><-</span> append <span class="Constant">[lesson/]</span>, sandbox-index <span id="L247" class="LineNr"> 247 </span> <a href='../088file.mu.html#L11'>resources</a> <span class="Special"><-</span> <a href='../088file.mu.html#L127'>dump</a> <a href='../088file.mu.html#L11'>resources</a>, filename, data @@ -313,7 +313,7 @@ if ('onhashchange' in window) { <span id="L250" class="LineNr"> 250 </span> <span id="L251" class="LineNr"> 251 </span><span class="muRecipe">def!</span> render-sandbox-side <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, env:&:environment, render-editor:<a href='004-programming-environment.mu.html#L400'>render-recipe</a><span class="muRecipe"> -> </span><a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, env:&:environment [ <span id="L252" class="LineNr"> 252 </span> <span class="Constant">local-scope</span> -<span id="L253" class="LineNr"> 253 </span> <span class="Constant">load-ingredients</span> +<span id="L253" class="LineNr"> 253 </span> <span class="Constant">load-inputs</span> <span id="L254" class="LineNr"> 254 </span> trace<span class="Constant"> 11</span>, <span class="Constant">[app]</span>, <span class="Constant">[render sandbox side]</span> <span id="L255" class="LineNr"> 255 </span> old-top-idx:num <span class="Special"><-</span> <a href='../081print.mu.html#L509'>save-top-idx</a> <a href='../081print.mu.html#L16'>screen</a> <span id="L256" class="LineNr"> 256 </span> current-sandbox:&:editor <span class="Special"><-</span> get *env, <span class="Constant">current-sandbox:offset</span> @@ -340,7 +340,7 @@ if ('onhashchange' in window) { <span id="L277" class="LineNr"> 277 </span> <span id="L278" class="LineNr"> 278 </span><span class="muRecipe">def</span> <a href='005-sandbox.mu.html#L278'>render-sandboxes</a> <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, sandbox:&:sandbox, left:num, right:num, row:num, render-from:num, idx:num<span class="muRecipe"> -> </span>row:num, <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, sandbox:&:sandbox [ <span id="L279" class="LineNr"> 279 </span> <span class="Constant">local-scope</span> -<span id="L280" class="LineNr"> 280 </span> <span class="Constant">load-ingredients</span> +<span id="L280" class="LineNr"> 280 </span> <span class="Constant">load-inputs</span> <span id="L281" class="LineNr"> 281 </span> <span class="muControl">return-unless</span> sandbox <span id="L282" class="LineNr"> 282 </span> <a href='../081print.mu.html#L782'>screen-height</a>:num <span class="Special"><-</span> <a href='../081print.mu.html#L782'>screen-height</a> <a href='../081print.mu.html#L16'>screen</a> <span id="L283" class="LineNr"> 283 </span> hidden?:bool <span class="Special"><-</span> lesser-than idx, render-from @@ -395,7 +395,7 @@ if ('onhashchange' in window) { <span id="L332" class="LineNr"> 332 </span> <span id="L333" class="LineNr"> 333 </span><span class="muRecipe">def</span> <a href='005-sandbox.mu.html#L333'>render-sandbox-menu</a> <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, sandbox-index:num, left:num, right:num<span class="muRecipe"> -> </span><a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a> [ <span id="L334" class="LineNr"> 334 </span> <span class="Constant">local-scope</span> -<span id="L335" class="LineNr"> 335 </span> <span class="Constant">load-ingredients</span> +<span id="L335" class="LineNr"> 335 </span> <span class="Constant">load-inputs</span> <span id="L336" class="LineNr"> 336 </span> <a href='../081print.mu.html#L760'>move-cursor-to-column</a> <a href='../081print.mu.html#L16'>screen</a>, left <span id="L337" class="LineNr"> 337 </span> edit-button-left:num, edit-button-right:num, copy-button-left:num, copy-button-right:num, recipe-button-left:num, recipe-button-right:num, delete-button-left:num <span class="Special"><-</span> <a href='005-sandbox.mu.html#L378'>sandbox-menu-columns</a> left, right <span id="L338" class="LineNr"> 338 </span> print <a href='../081print.mu.html#L16'>screen</a>, sandbox-index, <span class="Constant">232/dark-grey</span>, <span class="Constant">245/grey</span> @@ -440,7 +440,7 @@ if ('onhashchange' in window) { <span id="L377" class="LineNr"> 377 </span><span class="Comment"># all left/right pairs are inclusive</span> <span id="L378" class="LineNr"> 378 </span><span class="muRecipe">def</span> <a href='005-sandbox.mu.html#L378'>sandbox-menu-columns</a> left:num, right:num<span class="muRecipe"> -> </span>edit-button-left:num, edit-button-right:num, copy-button-left:num, copy-button-right:num, recipe-button-left:num, recipe-button-right:num, delete-button-left:num [ <span id="L379" class="LineNr"> 379 </span> <span class="Constant">local-scope</span> -<span id="L380" class="LineNr"> 380 </span> <span class="Constant">load-ingredients</span> +<span id="L380" class="LineNr"> 380 </span> <span class="Constant">load-inputs</span> <span id="L381" class="LineNr"> 381 </span> start-buttons:num <span class="Special"><-</span> add left, <span class="Constant">4/space-for-sandbox-index</span> <span id="L382" class="LineNr"> 382 </span> buttons-space:num <span class="Special"><-</span> subtract right, start-buttons <span id="L383" class="LineNr"> 383 </span> button-width:num <span class="Special"><-</span> divide-with-remainder buttons-space,<span class="Constant"> 4</span> <span class="Comment"># integer division</span> @@ -460,7 +460,7 @@ if ('onhashchange' in window) { <span id="L397" class="LineNr"> 397 </span><span class="Comment"># like 'render-code' but without syntax-based colorization</span> <span id="L398" class="LineNr"> 398 </span><span class="muRecipe">def</span> <a href='005-sandbox.mu.html#L398'>render-text</a> <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, s:text, left:num, right:num, color:num, row:num<span class="muRecipe"> -> </span>row:num, <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a> [ <span id="L399" class="LineNr"> 399 </span> <span class="Constant">local-scope</span> -<span id="L400" class="LineNr"> 400 </span> <span class="Constant">load-ingredients</span> +<span id="L400" class="LineNr"> 400 </span> <span class="Constant">load-inputs</span> <span id="L401" class="LineNr"> 401 </span> <span class="muControl">return-unless</span> s <span id="L402" class="LineNr"> 402 </span> column:num <span class="Special"><-</span> copy left <span id="L403" class="LineNr"> 403 </span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> move-cursor <a href='../081print.mu.html#L16'>screen</a>, row, column @@ -537,7 +537,7 @@ if ('onhashchange' in window) { <span id="L474" class="LineNr"> 474 </span><span class="Comment"># assumes programming environment has no sandboxes; restores them from previous session</span> <span id="L475" class="LineNr"> 475 </span><span class="muRecipe">def</span> <a href='005-sandbox.mu.html#L475'>restore-sandboxes</a> env:&:environment, <a href='../088file.mu.html#L11'>resources</a>:&:<a href='../088file.mu.html#L11'>resources</a><span class="muRecipe"> -> </span>env:&:environment [ <span id="L476" class="LineNr"> 476 </span> <span class="Constant">local-scope</span> -<span id="L477" class="LineNr"> 477 </span> <span class="Constant">load-ingredients</span> +<span id="L477" class="LineNr"> 477 </span> <span class="Constant">load-inputs</span> <span id="L478" class="LineNr"> 478 </span> <span class="Comment"># read all scenarios, pushing them to end of a list of scenarios</span> <span id="L479" class="LineNr"> 479 </span> idx:num <span class="Special"><-</span> copy<span class="Constant"> 0</span> <span id="L480" class="LineNr"> 480 </span> curr:&:sandbox <span class="Special"><-</span> copy<span class="Constant"> 0</span> @@ -571,7 +571,7 @@ if ('onhashchange' in window) { <span id="L508" class="LineNr"> 508 </span><span class="Comment"># leave cursor at start of next line</span> <span id="L509" class="LineNr"> 509 </span><span class="muRecipe">def</span> <a href='005-sandbox.mu.html#L509'>render-screen</a> <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, sandbox-screen:&:<a href='../081print.mu.html#L16'>screen</a>, left:num, right:num, row:num<span class="muRecipe"> -> </span>row:num, <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a> [ <span id="L510" class="LineNr"> 510 </span> <span class="Constant">local-scope</span> -<span id="L511" class="LineNr"> 511 </span> <span class="Constant">load-ingredients</span> +<span id="L511" class="LineNr"> 511 </span> <span class="Constant">load-inputs</span> <span id="L512" class="LineNr"> 512 </span> <span class="muControl">return-unless</span> sandbox-screen <span id="L513" class="LineNr"> 513 </span> <span class="Comment"># print 'screen:'</span> <span id="L514" class="LineNr"> 514 </span> row <span class="Special"><-</span> <a href='005-sandbox.mu.html#L398'>render-text</a> <a href='../081print.mu.html#L16'>screen</a>, <span class="Constant">[screen:]</span>, left, right, <span class="Constant">245/grey</span>, row @@ -745,7 +745,7 @@ if ('onhashchange' in window) { <span id="L682" class="LineNr"> 682 </span> <span id="L683" class="LineNr"> 683 </span><span class="muRecipe">def</span> <a href='005-sandbox.mu.html#L683'>editor-contents</a> editor:&:editor<span class="muRecipe"> -> </span>result:text [ <span id="L684" class="LineNr"> 684 </span> <span class="Constant">local-scope</span> -<span id="L685" class="LineNr"> 685 </span> <span class="Constant">load-ingredients</span> +<span id="L685" class="LineNr"> 685 </span> <span class="Constant">load-inputs</span> <span id="L686" class="LineNr"> 686 </span> buf:&:<a href='../061text.mu.html#L120'>buffer</a>:char <span class="Special"><-</span> <a href='../061text.mu.html#L125'>new-buffer</a><span class="Constant"> 80</span> <span id="L687" class="LineNr"> 687 </span> curr:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">data:offset</span> <span id="L688" class="LineNr"> 688 </span> <span class="Comment"># skip § sentinel</span> @@ -1007,7 +1007,7 @@ if ('onhashchange' in window) { <span id="L944" class="LineNr"> 944 </span><span class="Comment"># return 0 if there's no such sandbox, either because 'in' doesn't exist in 'env', or because it's the first sandbox</span> <span id="L945" class="LineNr"> 945 </span><span class="muRecipe">def</span> <a href='005-sandbox.mu.html#L945'>previous-sandbox</a> env:&:environment, in:&:sandbox<span class="muRecipe"> -> </span>out:&:sandbox [ <span id="L946" class="LineNr"> 946 </span> <span class="Constant">local-scope</span> -<span id="L947" class="LineNr"> 947 </span> <span class="Constant">load-ingredients</span> +<span id="L947" class="LineNr"> 947 </span> <span class="Constant">load-inputs</span> <span id="L948" class="LineNr"> 948 </span> curr:&:sandbox <span class="Special"><-</span> get *env, <span class="Constant">sandbox:offset</span> <span id="L949" class="LineNr"> 949 </span> <span class="muControl">return-unless</span> curr, <span class="Constant">0/nil</span> <span id="L950" class="LineNr"> 950 </span> <a href='../065duplex_list.mu.html#L25'>next</a>:&:sandbox <span class="Special"><-</span> get *curr, <span class="Constant">next-sandbox:offset</span> diff --git a/html/edit/006-sandbox-copy.mu.html b/html/edit/006-sandbox-copy.mu.html index 64332fb3..fc003903 100644 --- a/html/edit/006-sandbox-copy.mu.html +++ b/html/edit/006-sandbox-copy.mu.html @@ -201,7 +201,7 @@ if ('onhashchange' in window) { <span id="L139" class="LineNr">139 </span><span class="Comment"># some preconditions for attempting to copy a sandbox</span> <span id="L140" class="LineNr">140 </span><span class="muRecipe">def</span> <a href='006-sandbox-copy.mu.html#L140'>should-attempt-copy?</a> click-row:num, click-column:num, env:&:environment<span class="muRecipe"> -> </span>result:bool [ <span id="L141" class="LineNr">141 </span> <span class="Constant">local-scope</span> -<span id="L142" class="LineNr">142 </span> <span class="Constant">load-ingredients</span> +<span id="L142" class="LineNr">142 </span> <span class="Constant">load-inputs</span> <span id="L143" class="LineNr">143 </span> <span class="Comment"># are we below the sandbox editor?</span> <span id="L144" class="LineNr">144 </span> click-sandbox-area?:bool <span class="Special"><-</span> <a href='006-sandbox-copy.mu.html#L190'>click-on-sandbox-area?</a> click-row, click-column, env <span id="L145" class="LineNr">145 </span> <span class="muControl">return-unless</span> click-sandbox-area?, <span class="Constant">0/false</span> @@ -220,7 +220,7 @@ if ('onhashchange' in window) { <span id="L158" class="LineNr">158 </span> <span id="L159" class="LineNr">159 </span><span class="muRecipe">def</span> <a href='006-sandbox-copy.mu.html#L159'>try-copy-sandbox</a> click-row:num, env:&:environment<span class="muRecipe"> -> </span>clicked-on-copy-button?:bool, env:&:environment [ <span id="L160" class="LineNr">160 </span> <span class="Constant">local-scope</span> -<span id="L161" class="LineNr">161 </span> <span class="Constant">load-ingredients</span> +<span id="L161" class="LineNr">161 </span> <span class="Constant">load-inputs</span> <span id="L162" class="LineNr">162 </span> <span class="Comment"># identify the sandbox to copy, if the click was actually on the 'copy' button</span> <span id="L163" class="LineNr">163 </span> sandbox:&:sandbox <span class="Special"><-</span> <a href='006-sandbox-copy.mu.html#L175'>find-sandbox</a> env, click-row <span id="L164" class="LineNr">164 </span> <span class="muControl">return-unless</span> sandbox, <span class="Constant">0/false</span> @@ -236,7 +236,7 @@ if ('onhashchange' in window) { <span id="L174" class="LineNr">174 </span> <span id="L175" class="LineNr">175 </span><span class="muRecipe">def</span> <a href='006-sandbox-copy.mu.html#L175'>find-sandbox</a> env:&:environment, click-row:num<span class="muRecipe"> -> </span>result:&:sandbox [ <span id="L176" class="LineNr">176 </span> <span class="Constant">local-scope</span> -<span id="L177" class="LineNr">177 </span> <span class="Constant">load-ingredients</span> +<span id="L177" class="LineNr">177 </span> <span class="Constant">load-inputs</span> <span id="L178" class="LineNr">178 </span> curr-sandbox:&:sandbox <span class="Special"><-</span> get *env, <span class="Constant">sandbox:offset</span> <span id="L179" class="LineNr">179 </span> <span class="Delimiter">{</span> <span id="L180" class="LineNr">180 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> curr-sandbox @@ -251,7 +251,7 @@ if ('onhashchange' in window) { <span id="L189" class="LineNr">189 </span> <span id="L190" class="LineNr">190 </span><span class="muRecipe">def</span> <a href='006-sandbox-copy.mu.html#L190'>click-on-sandbox-area?</a> click-row:num, click-column:num, env:&:environment<span class="muRecipe"> -> </span>result:bool [ <span id="L191" class="LineNr">191 </span> <span class="Constant">local-scope</span> -<span id="L192" class="LineNr">192 </span> <span class="Constant">load-ingredients</span> +<span id="L192" class="LineNr">192 </span> <span class="Constant">load-inputs</span> <span id="L193" class="LineNr">193 </span> current-sandbox:&:editor <span class="Special"><-</span> get *env, <span class="Constant">current-sandbox:offset</span> <span id="L194" class="LineNr">194 </span> sandbox-left-margin:num <span class="Special"><-</span> get *current-sandbox, <span class="Constant">left:offset</span> <span id="L195" class="LineNr">195 </span> on-sandbox-side?:bool <span class="Special"><-</span> greater-or-equal click-column, sandbox-left-margin @@ -264,7 +264,7 @@ if ('onhashchange' in window) { <span id="L202" class="LineNr">202 </span> <span id="L203" class="LineNr">203 </span><span class="muRecipe">def</span> <a href='006-sandbox-copy.mu.html#L203'>empty-editor?</a> editor:&:editor<span class="muRecipe"> -> </span>result:bool [ <span id="L204" class="LineNr">204 </span> <span class="Constant">local-scope</span> -<span id="L205" class="LineNr">205 </span> <span class="Constant">load-ingredients</span> +<span id="L205" class="LineNr">205 </span> <span class="Constant">load-inputs</span> <span id="L206" class="LineNr">206 </span> head:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">data:offset</span> <span id="L207" class="LineNr">207 </span> first:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> head <span id="L208" class="LineNr">208 </span> result <span class="Special"><-</span> not first @@ -272,7 +272,7 @@ if ('onhashchange' in window) { <span id="L210" class="LineNr">210 </span> <span id="L211" class="LineNr">211 </span><span class="muRecipe">def</span> <a href='006-sandbox-copy.mu.html#L211'>within-range?</a> x:num, low:num, high:num<span class="muRecipe"> -> </span>result:bool [ <span id="L212" class="LineNr">212 </span> <span class="Constant">local-scope</span> -<span id="L213" class="LineNr">213 </span> <span class="Constant">load-ingredients</span> +<span id="L213" class="LineNr">213 </span> <span class="Constant">load-inputs</span> <span id="L214" class="LineNr">214 </span> not-too-far-left?:bool <span class="Special"><-</span> greater-or-equal x, low <span id="L215" class="LineNr">215 </span> not-too-far-right?:bool <span class="Special"><-</span> lesser-or-equal x, high <span id="L216" class="LineNr">216 </span> result <span class="Special"><-</span> and not-too-far-left? not-too-far-right? @@ -421,7 +421,7 @@ if ('onhashchange' in window) { <span id="L359" class="LineNr">359 </span><span class="Comment"># some preconditions for attempting to copy a sandbox into the recipe side</span> <span id="L360" class="LineNr">360 </span><span class="muRecipe">def</span> <a href='006-sandbox-copy.mu.html#L360'>should-copy-to-recipe?</a> click-row:num, click-column:num, env:&:environment<span class="muRecipe"> -> </span>result:bool [ <span id="L361" class="LineNr">361 </span> <span class="Constant">local-scope</span> -<span id="L362" class="LineNr">362 </span> <span class="Constant">load-ingredients</span> +<span id="L362" class="LineNr">362 </span> <span class="Constant">load-inputs</span> <span id="L363" class="LineNr">363 </span> <span class="Comment"># are we below the sandbox editor?</span> <span id="L364" class="LineNr">364 </span> click-sandbox-area?:bool <span class="Special"><-</span> <a href='006-sandbox-copy.mu.html#L190'>click-on-sandbox-area?</a> click-row, click-column, env <span id="L365" class="LineNr">365 </span> <span class="muControl">return-unless</span> click-sandbox-area?, <span class="Constant">0/false</span> @@ -436,7 +436,7 @@ if ('onhashchange' in window) { <span id="L374" class="LineNr">374 </span> <span id="L375" class="LineNr">375 </span><span class="muRecipe">def</span> <a href='006-sandbox-copy.mu.html#L375'>prepend-sandbox-into-recipe-side</a> click-row:num, env:&:environment<span class="muRecipe"> -> </span>clicked-on-copy-to-recipe-button?:bool, env:&:environment [ <span id="L376" class="LineNr">376 </span> <span class="Constant">local-scope</span> -<span id="L377" class="LineNr">377 </span> <span class="Constant">load-ingredients</span> +<span id="L377" class="LineNr">377 </span> <span class="Constant">load-inputs</span> <span id="L378" class="LineNr">378 </span> sandbox:&:sandbox <span class="Special"><-</span> <a href='006-sandbox-copy.mu.html#L175'>find-sandbox</a> env, click-row <span id="L379" class="LineNr">379 </span> <span class="muControl">return-unless</span> sandbox, <span class="Constant">0/false</span> <span id="L380" class="LineNr">380 </span> recipe-editor:&:editor <span class="Special"><-</span> get *env, <span class="Constant">recipes:offset</span> diff --git a/html/edit/007-sandbox-delete.mu.html b/html/edit/007-sandbox-delete.mu.html index 6bdae16e..c8fde128 100644 --- a/html/edit/007-sandbox-delete.mu.html +++ b/html/edit/007-sandbox-delete.mu.html @@ -144,7 +144,7 @@ if ('onhashchange' in window) { <span id="L82" class="LineNr"> 82 </span><span class="Comment"># some preconditions for attempting to delete a sandbox</span> <span id="L83" class="LineNr"> 83 </span><span class="muRecipe">def</span> <a href='007-sandbox-delete.mu.html#L83'>should-attempt-delete?</a> click-row:num, click-column:num, env:&:environment<span class="muRecipe"> -> </span>result:bool [ <span id="L84" class="LineNr"> 84 </span> <span class="Constant">local-scope</span> -<span id="L85" class="LineNr"> 85 </span> <span class="Constant">load-ingredients</span> +<span id="L85" class="LineNr"> 85 </span> <span class="Constant">load-inputs</span> <span id="L86" class="LineNr"> 86 </span> <span class="Comment"># are we below the sandbox editor?</span> <span id="L87" class="LineNr"> 87 </span> click-sandbox-area?:bool <span class="Special"><-</span> <a href='006-sandbox-copy.mu.html#L190'>click-on-sandbox-area?</a> click-row, click-column, env <span id="L88" class="LineNr"> 88 </span> <span class="muControl">return-unless</span> click-sandbox-area?, <span class="Constant">0/false</span> @@ -159,7 +159,7 @@ if ('onhashchange' in window) { <span id="L97" class="LineNr"> 97 </span> <span id="L98" class="LineNr"> 98 </span><span class="muRecipe">def</span> <a href='007-sandbox-delete.mu.html#L98'>try-delete-sandbox</a> click-row:num, env:&:environment<span class="muRecipe"> -> </span>clicked-on-delete-button?:bool, env:&:environment [ <span id="L99" class="LineNr"> 99 </span> <span class="Constant">local-scope</span> -<span id="L100" class="LineNr">100 </span> <span class="Constant">load-ingredients</span> +<span id="L100" class="LineNr">100 </span> <span class="Constant">load-inputs</span> <span id="L101" class="LineNr">101 </span> <span class="Comment"># identify the sandbox to delete, if the click was actually on the 'delete' button</span> <span id="L102" class="LineNr">102 </span> sandbox:&:sandbox <span class="Special"><-</span> <a href='006-sandbox-copy.mu.html#L175'>find-sandbox</a> env, click-row <span id="L103" class="LineNr">103 </span> <span class="muControl">return-unless</span> sandbox, <span class="Constant">0/false</span> @@ -169,7 +169,7 @@ if ('onhashchange' in window) { <span id="L107" class="LineNr">107 </span> <span id="L108" class="LineNr">108 </span><span class="muRecipe">def</span> <a href='007-sandbox-delete.mu.html#L108'>delete-sandbox</a> env:&:environment, sandbox:&:sandbox<span class="muRecipe"> -> </span>env:&:environment [ <span id="L109" class="LineNr">109 </span> <span class="Constant">local-scope</span> -<span id="L110" class="LineNr">110 </span> <span class="Constant">load-ingredients</span> +<span id="L110" class="LineNr">110 </span> <span class="Constant">load-inputs</span> <span id="L111" class="LineNr">111 </span> curr-sandbox:&:sandbox <span class="Special"><-</span> get *env, <span class="Constant">sandbox:offset</span> <span id="L112" class="LineNr">112 </span> first-sandbox?:bool <span class="Special"><-</span> equal curr-sandbox, sandbox <span id="L113" class="LineNr">113 </span> <span class="Delimiter">{</span> diff --git a/html/edit/008-sandbox-edit.mu.html b/html/edit/008-sandbox-edit.mu.html index 4c8025ab..7f6028a7 100644 --- a/html/edit/008-sandbox-edit.mu.html +++ b/html/edit/008-sandbox-edit.mu.html @@ -184,7 +184,7 @@ if ('onhashchange' in window) { <span id="L122" class="LineNr">122 </span><span class="Comment"># some preconditions for attempting to edit a sandbox</span> <span id="L123" class="LineNr">123 </span><span class="muRecipe">def</span> <a href='008-sandbox-edit.mu.html#L123'>should-attempt-edit?</a> click-row:num, click-column:num, env:&:environment<span class="muRecipe"> -> </span>result:bool [ <span id="L124" class="LineNr">124 </span> <span class="Constant">local-scope</span> -<span id="L125" class="LineNr">125 </span> <span class="Constant">load-ingredients</span> +<span id="L125" class="LineNr">125 </span> <span class="Constant">load-inputs</span> <span id="L126" class="LineNr">126 </span> <span class="Comment"># are we below the sandbox editor?</span> <span id="L127" class="LineNr">127 </span> click-sandbox-area?:bool <span class="Special"><-</span> <a href='006-sandbox-copy.mu.html#L190'>click-on-sandbox-area?</a> click-row, click-column, env <span id="L128" class="LineNr">128 </span> <span class="muControl">return-unless</span> click-sandbox-area?, <span class="Constant">0/false</span> @@ -203,7 +203,7 @@ if ('onhashchange' in window) { <span id="L141" class="LineNr">141 </span> <span id="L142" class="LineNr">142 </span><span class="muRecipe">def</span> <a href='008-sandbox-edit.mu.html#L142'>try-edit-sandbox</a> click-row:num, env:&:environment<span class="muRecipe"> -> </span>clicked-on-edit-button?:bool, env:&:environment [ <span id="L143" class="LineNr">143 </span> <span class="Constant">local-scope</span> -<span id="L144" class="LineNr">144 </span> <span class="Constant">load-ingredients</span> +<span id="L144" class="LineNr">144 </span> <span class="Constant">load-inputs</span> <span id="L145" class="LineNr">145 </span> <span class="Comment"># identify the sandbox to edit, if the click was actually on the 'edit' button</span> <span id="L146" class="LineNr">146 </span> sandbox:&:sandbox <span class="Special"><-</span> <a href='006-sandbox-copy.mu.html#L175'>find-sandbox</a> env, click-row <span id="L147" class="LineNr">147 </span> <span class="muControl">return-unless</span> sandbox, <span class="Constant">0/false</span> diff --git a/html/edit/009-sandbox-test.mu.html b/html/edit/009-sandbox-test.mu.html index c6ef7017..e311f2c0 100644 --- a/html/edit/009-sandbox-test.mu.html +++ b/html/edit/009-sandbox-test.mu.html @@ -214,7 +214,7 @@ if ('onhashchange' in window) { <span id="L151" class="LineNr">151 </span> <span id="L152" class="LineNr">152 </span><span class="muRecipe">def</span> <a href='009-sandbox-test.mu.html#L152'>find-click-in-sandbox-output</a> env:&:environment, click-row:num<span class="muRecipe"> -> </span>sandbox:&:sandbox, sandbox-index:num [ <span id="L153" class="LineNr">153 </span> <span class="Constant">local-scope</span> -<span id="L154" class="LineNr">154 </span> <span class="Constant">load-ingredients</span> +<span id="L154" class="LineNr">154 </span> <span class="Constant">load-inputs</span> <span id="L155" class="LineNr">155 </span> <span class="Comment"># assert click-row >= sandbox.starting-row-on-screen</span> <span id="L156" class="LineNr">156 </span> sandbox:&:sandbox <span class="Special"><-</span> get *env, <span class="Constant">sandbox:offset</span> <span id="L157" class="LineNr">157 </span> start:num <span class="Special"><-</span> get *sandbox, <span class="Constant">starting-row-on-screen:offset</span> @@ -242,7 +242,7 @@ if ('onhashchange' in window) { <span id="L179" class="LineNr">179 </span> <span id="L180" class="LineNr">180 </span><span class="muRecipe">def</span> <a href='009-sandbox-test.mu.html#L180'>toggle-expected-response</a> sandbox:&:sandbox<span class="muRecipe"> -> </span>sandbox:&:sandbox [ <span id="L181" class="LineNr">181 </span> <span class="Constant">local-scope</span> -<span id="L182" class="LineNr">182 </span> <span class="Constant">load-ingredients</span> +<span id="L182" class="LineNr">182 </span> <span class="Constant">load-inputs</span> <span id="L183" class="LineNr">183 </span> expected-response:text <span class="Special"><-</span> get *sandbox, <span class="Constant">expected-response:offset</span> <span id="L184" class="LineNr">184 </span> <span class="Delimiter">{</span> <span id="L185" class="LineNr">185 </span> <span class="Conceal">¦</span> <span class="Comment"># if expected-response is set, reset</span> @@ -269,7 +269,7 @@ if ('onhashchange' in window) { <span id="L206" class="LineNr">206 </span> <span id="L207" class="LineNr">207 </span><span class="muRecipe">def</span> <a href='009-sandbox-test.mu.html#L207'>render-sandbox-response</a> <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, sandbox:&:sandbox, left:num, right:num<span class="muRecipe"> -> </span>row:num, <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a> [ <span id="L208" class="LineNr">208 </span> <span class="Constant">local-scope</span> -<span id="L209" class="LineNr">209 </span> <span class="Constant">load-ingredients</span> +<span id="L209" class="LineNr">209 </span> <span class="Constant">load-inputs</span> <span id="L210" class="LineNr">210 </span> sandbox-response:text <span class="Special"><-</span> get *sandbox, <span class="Constant">response:offset</span> <span id="L211" class="LineNr">211 </span> expected-response:text <span class="Special"><-</span> get *sandbox, <span class="Constant">expected-response:offset</span> <span id="L212" class="LineNr">212 </span> row:num <span class="Special"><-</span> get *sandbox <span class="Constant">response-starting-row-on-screen:offset</span> diff --git a/html/edit/010-sandbox-trace.mu.html b/html/edit/010-sandbox-trace.mu.html index 892be6eb..8f907fa7 100644 --- a/html/edit/010-sandbox-trace.mu.html +++ b/html/edit/010-sandbox-trace.mu.html @@ -237,7 +237,7 @@ if ('onhashchange' in window) { <span id="L174" class="LineNr">174 </span><span class="Comment"># replaced in a later layer</span> <span id="L175" class="LineNr">175 </span><span class="muRecipe">def!</span> update-sandbox sandbox:&:sandbox, env:&:environment, idx:num<span class="muRecipe"> -> </span>sandbox:&:sandbox, env:&:environment [ <span id="L176" class="LineNr">176 </span> <span class="Constant">local-scope</span> -<span id="L177" class="LineNr">177 </span> <span class="Constant">load-ingredients</span> +<span id="L177" class="LineNr">177 </span> <span class="Constant">load-inputs</span> <span id="L178" class="LineNr">178 </span> data:text <span class="Special"><-</span> get *sandbox, <span class="Constant">data:offset</span> <span id="L179" class="LineNr">179 </span> response:text, _, fake-screen:&:<a href='../081print.mu.html#L16'>screen</a>, trace:text <span class="Special"><-</span> run-sandboxed data <span id="L180" class="LineNr">180 </span> *sandbox <span class="Special"><-</span> put *sandbox, <span class="Constant">response:offset</span>, response @@ -274,7 +274,7 @@ if ('onhashchange' in window) { <span id="L211" class="LineNr">211 </span> <span id="L212" class="LineNr">212 </span><span class="muRecipe">def</span> <a href='010-sandbox-trace.mu.html#L212'>find-click-in-sandbox-code</a> env:&:environment, click-row:num<span class="muRecipe"> -> </span>sandbox:&:sandbox [ <span id="L213" class="LineNr">213 </span> <span class="Constant">local-scope</span> -<span id="L214" class="LineNr">214 </span> <span class="Constant">load-ingredients</span> +<span id="L214" class="LineNr">214 </span> <span class="Constant">load-inputs</span> <span id="L215" class="LineNr">215 </span> <span class="Comment"># assert click-row >= sandbox.starting-row-on-screen</span> <span id="L216" class="LineNr">216 </span> sandbox <span class="Special"><-</span> get *env, <span class="Constant">sandbox:offset</span> <span id="L217" class="LineNr">217 </span> start:num <span class="Special"><-</span> get *sandbox, <span class="Constant">starting-row-on-screen:offset</span> diff --git a/html/edit/011-errors.mu.html b/html/edit/011-errors.mu.html index 136fc31f..8519462b 100644 --- a/html/edit/011-errors.mu.html +++ b/html/edit/011-errors.mu.html @@ -70,7 +70,7 @@ if ('onhashchange' in window) { <span id="L7" class="LineNr"> 7 </span><span class="Comment"># copy code from recipe editor, persist to disk, load, save any errors</span> <span id="L8" class="LineNr"> 8 </span><span class="muRecipe">def!</span> update-recipes env:&:environment, <a href='../088file.mu.html#L11'>resources</a>:&:<a href='../088file.mu.html#L11'>resources</a>, <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a><span class="muRecipe"> -> </span>errors-found?:bool, env:&:environment, <a href='../088file.mu.html#L11'>resources</a>:&:<a href='../088file.mu.html#L11'>resources</a>, <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a> [ <span id="L9" class="LineNr"> 9 </span> <span class="Constant">local-scope</span> -<span id="L10" class="LineNr"> 10 </span> <span class="Constant">load-ingredients</span> +<span id="L10" class="LineNr"> 10 </span> <span class="Constant">load-inputs</span> <span id="L11" class="LineNr"> 11 </span> recipes:&:editor <span class="Special"><-</span> get *env, <span class="Constant">recipes:offset</span> <span id="L12" class="LineNr"> 12 </span> in:text <span class="Special"><-</span> <a href='005-sandbox.mu.html#L683'>editor-contents</a> recipes <span id="L13" class="LineNr"> 13 </span> <a href='../088file.mu.html#L11'>resources</a> <span class="Special"><-</span> <a href='../088file.mu.html#L127'>dump</a> <a href='../088file.mu.html#L11'>resources</a>, <span class="Constant">[lesson/recipes.mu]</span>, in @@ -104,7 +104,7 @@ if ('onhashchange' in window) { <span id="L41" class="LineNr"> 41 </span> <span id="L42" class="LineNr"> 42 </span><span class="muRecipe">def</span> <a href='011-errors.mu.html#L42'>render-recipe-errors</a> env:&:environment, <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a><span class="muRecipe"> -> </span><a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a> [ <span id="L43" class="LineNr"> 43 </span> <span class="Constant">local-scope</span> -<span id="L44" class="LineNr"> 44 </span> <span class="Constant">load-ingredients</span> +<span id="L44" class="LineNr"> 44 </span> <span class="Constant">load-inputs</span> <span id="L45" class="LineNr"> 45 </span> recipe-errors:text <span class="Special"><-</span> get *env, <span class="Constant">recipe-errors:offset</span> <span id="L46" class="LineNr"> 46 </span> <span class="muControl">return-unless</span> recipe-errors <span id="L47" class="LineNr"> 47 </span> recipes:&:editor <span class="Special"><-</span> get *env, <span class="Constant">recipes:offset</span> @@ -159,7 +159,7 @@ if ('onhashchange' in window) { <span id="L96" class="LineNr"> 96 </span> <span id="L97" class="LineNr"> 97 </span><span class="muRecipe">def!</span> update-sandbox sandbox:&:sandbox, env:&:environment, idx:num<span class="muRecipe"> -> </span>sandbox:&:sandbox, env:&:environment [ <span id="L98" class="LineNr"> 98 </span> <span class="Constant">local-scope</span> -<span id="L99" class="LineNr"> 99 </span> <span class="Constant">load-ingredients</span> +<span id="L99" class="LineNr"> 99 </span> <span class="Constant">load-inputs</span> <span id="L100" class="LineNr">100 </span> data:text <span class="Special"><-</span> get *sandbox, <span class="Constant">data:offset</span> <span id="L101" class="LineNr">101 </span> response:text, errors:text, fake-screen:&:<a href='../081print.mu.html#L16'>screen</a>, trace:text, completed?:bool <span class="Special"><-</span> run-sandboxed data <span id="L102" class="LineNr">102 </span> *sandbox <span class="Special"><-</span> put *sandbox, <span class="Constant">response:offset</span>, response diff --git a/html/edit/012-editor-undo.mu.html b/html/edit/012-editor-undo.mu.html index dcf95a50..0bda1aaf 100644 --- a/html/edit/012-editor-undo.mu.html +++ b/html/edit/012-editor-undo.mu.html @@ -264,7 +264,7 @@ if ('onhashchange' in window) { <span id="L201" class="LineNr"> 201 </span><span class="Comment"># moving the cursor can lose work on the undo stack.</span> <span id="L202" class="LineNr"> 202 </span><span class="muRecipe">def</span> <a href='012-editor-undo.mu.html#L202'>add-operation</a> editor:&:editor, op:&:<a href='012-editor-undo.mu.html#L5'>operation</a><span class="muRecipe"> -> </span>editor:&:editor [ <span id="L203" class="LineNr"> 203 </span> <span class="Constant">local-scope</span> -<span id="L204" class="LineNr"> 204 </span> <span class="Constant">load-ingredients</span> +<span id="L204" class="LineNr"> 204 </span> <span class="Constant">load-inputs</span> <span id="L205" class="LineNr"> 205 </span> undo:&:<a href='../064list.mu.html#L6'>list</a>:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> get *editor, <span class="Constant">undo:offset</span> <span id="L206" class="LineNr"> 206 </span> undo <span class="Special"><-</span> push op undo <span id="L207" class="LineNr"> 207 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">undo:offset</span>, undo |