diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2017-12-27 20:38:53 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2017-12-27 20:39:51 -0800 |
commit | f0c55e6b97edf8971ce4adad3ee53cbfa406b7ef (patch) | |
tree | d816e398a5bc38010f277e6677b9de83bc3f2faa /html/edit/003-shortcuts.mu.html | |
parent | e82dc626685875d56738e733f7e18203f2ac7f9d (diff) | |
download | mu-f0c55e6b97edf8971ce4adad3ee53cbfa406b7ef.tar.gz |
4165
Diffstat (limited to 'html/edit/003-shortcuts.mu.html')
-rw-r--r-- | html/edit/003-shortcuts.mu.html | 124 |
1 files changed, 62 insertions, 62 deletions
diff --git a/html/edit/003-shortcuts.mu.html b/html/edit/003-shortcuts.mu.html index 89d573d7..ce5f7289 100644 --- a/html/edit/003-shortcuts.mu.html +++ b/html/edit/003-shortcuts.mu.html @@ -120,7 +120,7 @@ if ('onhashchange' in window) { <span id="L58" class="LineNr"> 58 </span> <span class="Conceal">¦</span> <a href='002-typing.mu.html#L203'>insert-at-cursor</a> editor, <span class="Constant">32/space</span>, <a href='../081print.mu.html#L16'>screen</a> <span id="L59" class="LineNr"> 59 </span> <span class="Conceal">¦</span> go-render? <span class="Special"><-</span> <a href='002-typing.mu.html#L203'>insert-at-cursor</a> editor, <span class="Constant">32/space</span>, <a href='../081print.mu.html#L16'>screen</a> <span id="L60" class="LineNr"> 60 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <end-insert-character></span> -<span id="L61" class="LineNr"> 61 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L61" class="LineNr"> 61 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L62" class="LineNr"> 62 </span> <span class="Delimiter">}</span> <span id="L63" class="LineNr"> 63 </span>] <span id="L64" class="LineNr"> 64 </span> @@ -161,7 +161,7 @@ if ('onhashchange' in window) { <span id="L99" class="LineNr"> 99 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <a href='003-shortcuts.mu.html#L99'><begin-backspace-character></a></span> <span id="L100" class="LineNr"> 100 </span> <span class="Conceal">¦</span> go-render?:bool, backspaced-cell:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L109'>delete-before-cursor</a> editor, <a href='../081print.mu.html#L16'>screen</a> <span id="L101" class="LineNr"> 101 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <a href='003-shortcuts.mu.html#L101'><end-backspace-character></a></span> -<span id="L102" class="LineNr"> 102 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L102" class="LineNr"> 102 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L103" class="LineNr"> 103 </span> <span class="Delimiter">}</span> <span id="L104" class="LineNr"> 104 </span>] <span id="L105" class="LineNr"> 105 </span> @@ -207,7 +207,7 @@ if ('onhashchange' in window) { <span id="L145" class="LineNr"> 145 </span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> print <a href='../081print.mu.html#L16'>screen</a>, currc <span id="L146" class="LineNr"> 146 </span> <span class="Conceal">¦</span> curr-column <span class="Special"><-</span> add curr-column,<span class="Constant"> 1</span> <span id="L147" class="LineNr"> 147 </span> <span class="Conceal">¦</span> curr <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> curr -<span id="L148" class="LineNr"> 148 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L148" class="LineNr"> 148 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L149" class="LineNr"> 149 </span> <span class="Delimiter">}</span> <span id="L150" class="LineNr"> 150 </span> <span class="Comment"># we're guaranteed not to be at the right margin</span> <span id="L151" class="LineNr"> 151 </span> space:char <span class="Special"><-</span> copy <span class="Constant">32/space</span> @@ -230,7 +230,7 @@ if ('onhashchange' in window) { <span id="L168" class="LineNr"> 168 </span> <span class="Conceal">¦</span> trace<span class="Constant"> 10</span>, <span class="Constant">[app]</span>, <span class="Constant">[decrementing cursor column]</span> <span id="L169" class="LineNr"> 169 </span> <span class="Conceal">¦</span> cursor-column <span class="Special"><-</span> subtract cursor-column,<span class="Constant"> 1</span> <span id="L170" class="LineNr"> 170 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-column:offset</span>, cursor-column -<span id="L171" class="LineNr"> 171 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L171" class="LineNr"> 171 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L172" class="LineNr"> 172 </span> <span class="Delimiter">}</span> <span id="L173" class="LineNr"> 173 </span> <span class="Comment"># if at left margin, we must move to previous row:</span> <span id="L174" class="LineNr"> 174 </span> top-of-screen?:bool <span class="Special"><-</span> equal cursor-row,<span class="Constant"> 1</span> <span class="Comment"># exclude menu bar</span> @@ -267,7 +267,7 @@ if ('onhashchange' in window) { <span id="L205" class="LineNr"> 205 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> cursor-column <span class="Special"><-</span> add left, end-of-line <span id="L206" class="LineNr"> 206 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-column:offset</span>, cursor-column <span id="L207" class="LineNr"> 207 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> -<span id="L208" class="LineNr"> 208 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L208" class="LineNr"> 208 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L209" class="LineNr"> 209 </span> <span class="Delimiter">}</span> <span id="L210" class="LineNr"> 210 </span> <span class="Comment"># case 2: if previous-character was not newline, we're just at a wrapped line</span> <span id="L211" class="LineNr"> 211 </span> trace<span class="Constant"> 10</span>, <span class="Constant">[app]</span>, <span class="Constant">[wrapping to previous line]</span> @@ -294,7 +294,7 @@ if ('onhashchange' in window) { <span id="L232" class="LineNr"> 232 </span> <span class="Conceal">¦</span> at-newline?:bool <span class="Special"><-</span> equal c, <span class="Constant">10/newline</span> <span id="L233" class="LineNr"> 233 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> at-newline? <span id="L234" class="LineNr"> 234 </span> <span class="Conceal">¦</span> result <span class="Special"><-</span> add result,<span class="Constant"> 1</span> -<span id="L235" class="LineNr"> 235 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L235" class="LineNr"> 235 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L236" class="LineNr"> 236 </span> <span class="Delimiter">}</span> <span id="L237" class="LineNr"> 237 </span>] <span id="L238" class="LineNr"> 238 </span> @@ -428,7 +428,7 @@ if ('onhashchange' in window) { <span id="L366" class="LineNr"> 366 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <a href='003-shortcuts.mu.html#L366'><begin-delete-character></a></span> <span id="L367" class="LineNr"> 367 </span> <span class="Conceal">¦</span> go-render?:bool, deleted-cell:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L373'>delete-at-cursor</a> editor, <a href='../081print.mu.html#L16'>screen</a> <span id="L368" class="LineNr"> 368 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <a href='003-shortcuts.mu.html#L368'><end-delete-character></a></span> -<span id="L369" class="LineNr"> 369 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L369" class="LineNr"> 369 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L370" class="LineNr"> 370 </span> <span class="Delimiter">}</span> <span id="L371" class="LineNr"> 371 </span>] <span id="L372" class="LineNr"> 372 </span> @@ -461,7 +461,7 @@ if ('onhashchange' in window) { <span id="L399" class="LineNr"> 399 </span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> print <a href='../081print.mu.html#L16'>screen</a>, currc <span id="L400" class="LineNr"> 400 </span> <span class="Conceal">¦</span> curr-column <span class="Special"><-</span> add curr-column,<span class="Constant"> 1</span> <span id="L401" class="LineNr"> 401 </span> <span class="Conceal">¦</span> curr <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> curr -<span id="L402" class="LineNr"> 402 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L402" class="LineNr"> 402 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L403" class="LineNr"> 403 </span> <span class="Delimiter">}</span> <span id="L404" class="LineNr"> 404 </span> <span class="Comment"># we're guaranteed not to be at the right margin</span> <span id="L405" class="LineNr"> 405 </span> space:char <span class="Special"><-</span> copy <span class="Constant">32/space</span> @@ -508,7 +508,7 @@ if ('onhashchange' in window) { <span id="L446" class="LineNr"> 446 </span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> move-cursor <a href='../081print.mu.html#L16'>screen</a>, cursor-row, cursor-column <span id="L447" class="LineNr"> 447 </span> <span class="Conceal">¦</span> undo-coalesce-tag:num <span class="Special"><-</span> copy <span class="Constant">2/right-arrow</span> <span id="L448" class="LineNr"> 448 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <end-move-cursor></span> -<span id="L449" class="LineNr"> 449 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L449" class="LineNr"> 449 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L450" class="LineNr"> 450 </span> <span class="Delimiter">}</span> <span id="L451" class="LineNr"> 451 </span>] <span id="L452" class="LineNr"> 452 </span> @@ -534,7 +534,7 @@ if ('onhashchange' in window) { <span id="L472" class="LineNr"> 472 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <scroll-down></span> <span id="L473" class="LineNr"> 473 </span> <span class="Conceal">¦</span> cursor-row <span class="Special"><-</span> subtract cursor-row,<span class="Constant"> 1</span> <span class="Comment"># bring back into screen range</span> <span id="L474" class="LineNr"> 474 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-row:offset</span>, cursor-row -<span id="L475" class="LineNr"> 475 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">1/go-render</span> +<span id="L475" class="LineNr"> 475 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">1/go-render</span> <span id="L476" class="LineNr"> 476 </span> <span class="Delimiter">}</span> <span id="L477" class="LineNr"> 477 </span> <span class="Comment"># if the line wraps, move cursor to start of next row</span> <span id="L478" class="LineNr"> 478 </span> <span class="Delimiter">{</span> @@ -557,7 +557,7 @@ if ('onhashchange' in window) { <span id="L495" class="LineNr"> 495 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <scroll-down></span> <span id="L496" class="LineNr"> 496 </span> <span class="Conceal">¦</span> cursor-row <span class="Special"><-</span> subtract cursor-row,<span class="Constant"> 1</span> <span class="Comment"># bring back into screen range</span> <span id="L497" class="LineNr"> 497 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-row:offset</span>, cursor-row -<span id="L498" class="LineNr"> 498 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">1/go-render</span> +<span id="L498" class="LineNr"> 498 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">1/go-render</span> <span id="L499" class="LineNr"> 499 </span> <span class="Delimiter">}</span> <span id="L500" class="LineNr"> 500 </span> <span class="Comment"># otherwise move cursor one character right</span> <span id="L501" class="LineNr"> 501 </span> cursor-column <span class="Special"><-</span> add cursor-column,<span class="Constant"> 1</span> @@ -791,7 +791,7 @@ if ('onhashchange' in window) { <span id="L729" class="LineNr"> 729 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">before-cursor:offset</span>, before-cursor <span id="L730" class="LineNr"> 730 </span> <span class="Conceal">¦</span> undo-coalesce-tag:num <span class="Special"><-</span> copy <span class="Constant">1/left-arrow</span> <span id="L731" class="LineNr"> 731 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <end-move-cursor></span> -<span id="L732" class="LineNr"> 732 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L732" class="LineNr"> 732 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L733" class="LineNr"> 733 </span> <span class="Delimiter">}</span> <span id="L734" class="LineNr"> 734 </span>] <span id="L735" class="LineNr"> 735 </span> @@ -1055,7 +1055,7 @@ if ('onhashchange' in window) { <span id="L993" class="LineNr"> 993 </span> <span class="Conceal">¦</span> go-render? <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L1000'>move-to-previous-line</a> editor <span id="L994" class="LineNr"> 994 </span> <span class="Conceal">¦</span> undo-coalesce-tag:num <span class="Special"><-</span> copy <span class="Constant">3/up-arrow</span> <span id="L995" class="LineNr"> 995 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <end-move-cursor></span> -<span id="L996" class="LineNr"> 996 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L996" class="LineNr"> 996 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L997" class="LineNr"> 997 </span> <span class="Delimiter">}</span> <span id="L998" class="LineNr"> 998 </span>] <span id="L999" class="LineNr"> 999 </span> @@ -1110,15 +1110,15 @@ if ('onhashchange' in window) { <span id="L1048" class="LineNr">1048 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">before-cursor:offset</span>, before-cursor <span id="L1049" class="LineNr">1049 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> cursor-column <span class="Special"><-</span> add cursor-column,<span class="Constant"> 1</span> <span id="L1050" class="LineNr">1050 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-column:offset</span>, cursor-column -<span id="L1051" class="LineNr">1051 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L1051" class="LineNr">1051 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L1052" class="LineNr">1052 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> -<span id="L1053" class="LineNr">1053 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L1053" class="LineNr">1053 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L1054" class="LineNr">1054 </span> <span class="Delimiter">}</span> <span id="L1055" class="LineNr">1055 </span> <span class="Delimiter">{</span> <span id="L1056" class="LineNr">1056 </span> <span class="Conceal">¦</span> <span class="Comment"># if cursor already at top, scroll up</span> <span id="L1057" class="LineNr">1057 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> already-at-top? <span id="L1058" class="LineNr">1058 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <scroll-up></span> -<span id="L1059" class="LineNr">1059 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">1/go-render</span> +<span id="L1059" class="LineNr">1059 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">1/go-render</span> <span id="L1060" class="LineNr">1060 </span> <span class="Delimiter">}</span> <span id="L1061" class="LineNr">1061 </span>] <span id="L1062" class="LineNr">1062 </span> @@ -1409,7 +1409,7 @@ if ('onhashchange' in window) { <span id="L1347" class="LineNr">1347 </span> <span class="Conceal">¦</span> go-render? <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L1354'>move-to-next-line</a> editor, <a href='../081print.mu.html#L782'>screen-height</a> <span id="L1348" class="LineNr">1348 </span> <span class="Conceal">¦</span> undo-coalesce-tag:num <span class="Special"><-</span> copy <span class="Constant">4/down-arrow</span> <span id="L1349" class="LineNr">1349 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <end-move-cursor></span> -<span id="L1350" class="LineNr">1350 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L1350" class="LineNr">1350 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L1351" class="LineNr">1351 </span> <span class="Delimiter">}</span> <span id="L1352" class="LineNr">1352 </span>] <span id="L1353" class="LineNr">1353 </span> @@ -1428,11 +1428,11 @@ if ('onhashchange' in window) { <span id="L1366" class="LineNr">1366 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> before-cursor <span id="L1367" class="LineNr">1367 </span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> <span id="L1368" class="LineNr">1368 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> at-bottom-of-screen? -<span id="L1369" class="LineNr">1369 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">0/don't-render</span> +<span id="L1369" class="LineNr">1369 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">0/don't-render</span> <span id="L1370" class="LineNr">1370 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L1371" class="LineNr">1371 </span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> <span id="L1372" class="LineNr">1372 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> at-bottom-of-screen? -<span id="L1373" class="LineNr">1373 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">jump</span> <span class="Constant">+try-to-scroll</span> +<span id="L1373" class="LineNr">1373 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> jump</span> <span class="Constant">+try-to-scroll</span> <span id="L1374" class="LineNr">1374 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L1375" class="LineNr">1375 </span> <span class="Delimiter">}</span> <span id="L1376" class="LineNr">1376 </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> before-cursor @@ -1440,11 +1440,11 @@ if ('onhashchange' in window) { <span id="L1378" class="LineNr">1378 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> <a href='../065duplex_list.mu.html#L25'>next</a> <span id="L1379" class="LineNr">1379 </span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> <span id="L1380" class="LineNr">1380 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> at-bottom-of-screen? -<span id="L1381" class="LineNr">1381 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">0/don't-render</span> +<span id="L1381" class="LineNr">1381 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">0/don't-render</span> <span id="L1382" class="LineNr">1382 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L1383" class="LineNr">1383 </span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> <span id="L1384" class="LineNr">1384 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> at-bottom-of-screen? -<span id="L1385" class="LineNr">1385 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">jump</span> <span class="Constant">+try-to-scroll</span> +<span id="L1385" class="LineNr">1385 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> jump</span> <span class="Constant">+try-to-scroll</span> <span id="L1386" class="LineNr">1386 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L1387" class="LineNr">1387 </span> <span class="Delimiter">}</span> <span id="L1388" class="LineNr">1388 </span> already-at-bottom?:bool <span class="Special"><-</span> greater-or-equal cursor-row, last-line @@ -1463,17 +1463,17 @@ if ('onhashchange' in window) { <span id="L1401" class="LineNr">1401 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> c:char <span class="Special"><-</span> get *next, <span class="Constant">value:offset</span> <span id="L1402" class="LineNr">1402 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> at-newline?:bool <span class="Special"><-</span> equal c, <span class="Constant">10/newline</span> <span id="L1403" class="LineNr">1403 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> at-newline? -<span id="L1404" class="LineNr">1404 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L1404" class="LineNr">1404 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L1405" class="LineNr">1405 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L1406" class="LineNr">1406 </span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> <span id="L1407" class="LineNr">1407 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> <a href='../065duplex_list.mu.html#L25'>next</a> <span id="L1408" class="LineNr">1408 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> <span id="L1409" class="LineNr">1409 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> at-bottom-of-screen? -<span id="L1410" class="LineNr">1410 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">0/don't-render</span> +<span id="L1410" class="LineNr">1410 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">0/don't-render</span> <span id="L1411" class="LineNr">1411 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L1412" class="LineNr">1412 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> <span id="L1413" class="LineNr">1413 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> at-bottom-of-screen? -<span id="L1414" class="LineNr">1414 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">jump</span> <span class="Constant">+try-to-scroll</span> +<span id="L1414" class="LineNr">1414 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> jump</span> <span class="Constant">+try-to-scroll</span> <span id="L1415" class="LineNr">1415 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L1416" class="LineNr">1416 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L1417" class="LineNr">1417 </span> <span class="Conceal">¦</span> cursor-row <span class="Special"><-</span> add cursor-row,<span class="Constant"> 1</span> @@ -1488,12 +1488,12 @@ if ('onhashchange' in window) { <span id="L1426" class="LineNr">1426 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> done? <span id="L1427" class="LineNr">1427 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> cursor-column <span class="Special"><-</span> add cursor-column,<span class="Constant"> 1</span> <span id="L1428" class="LineNr">1428 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> before-cursor <span class="Special"><-</span> copy <a href='../065duplex_list.mu.html#L25'>next</a> -<span id="L1429" class="LineNr">1429 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L1429" class="LineNr">1429 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L1430" class="LineNr">1430 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L1431" class="LineNr">1431 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">before-cursor:offset</span>, before-cursor <span id="L1432" class="LineNr">1432 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-column:offset</span>, cursor-column <span id="L1433" class="LineNr">1433 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-row:offset</span>, cursor-row -<span id="L1434" class="LineNr">1434 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">0/don't-render</span> +<span id="L1434" class="LineNr">1434 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">0/don't-render</span> <span id="L1435" class="LineNr">1435 </span> <span class="Delimiter">}</span> <span id="L1436" class="LineNr">1436 </span><span class="Constant"> +try-to-scroll</span> <span id="L1437" class="LineNr">1437 </span><span class="Constant"> <scroll-down></span> @@ -1606,7 +1606,7 @@ if ('onhashchange' in window) { <span id="L1544" class="LineNr">1544 </span> <span class="Conceal">¦</span> <a href='003-shortcuts.mu.html#L1565'>move-to-start-of-screen-line</a> editor <span id="L1545" class="LineNr">1545 </span> <span class="Conceal">¦</span> undo-coalesce-tag:num <span class="Special"><-</span> copy <span class="Constant">0/never</span> <span id="L1546" class="LineNr">1546 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <end-move-cursor></span> -<span id="L1547" class="LineNr">1547 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">0/don't-render</span> +<span id="L1547" class="LineNr">1547 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">0/don't-render</span> <span id="L1548" class="LineNr">1548 </span> <span class="Delimiter">}</span> <span id="L1549" class="LineNr">1549 </span>] <span id="L1550" class="LineNr">1550 </span> @@ -1618,7 +1618,7 @@ if ('onhashchange' in window) { <span id="L1556" class="LineNr">1556 </span> <span class="Conceal">¦</span> <a href='003-shortcuts.mu.html#L1565'>move-to-start-of-screen-line</a> editor <span id="L1557" class="LineNr">1557 </span> <span class="Conceal">¦</span> undo-coalesce-tag:num <span class="Special"><-</span> copy <span class="Constant">0/never</span> <span id="L1558" class="LineNr">1558 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <end-move-cursor></span> -<span id="L1559" class="LineNr">1559 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">0/don't-render</span> +<span id="L1559" class="LineNr">1559 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">0/don't-render</span> <span id="L1560" class="LineNr">1560 </span> <span class="Delimiter">}</span> <span id="L1561" class="LineNr">1561 </span>] <span id="L1562" class="LineNr">1562 </span> @@ -1639,7 +1639,7 @@ if ('onhashchange' in window) { <span id="L1577" class="LineNr">1577 </span> <span class="Conceal">¦</span> assert curr, <span class="Constant">[move-to-start-of-line tried to move before start of text]</span> <span id="L1578" class="LineNr">1578 </span> <span class="Conceal">¦</span> curr <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L32'>prev</a> curr <span id="L1579" class="LineNr">1579 </span> <span class="Conceal">¦</span> col <span class="Special"><-</span> subtract col,<span class="Constant"> 1</span> -<span id="L1580" class="LineNr">1580 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L1580" class="LineNr">1580 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L1581" class="LineNr">1581 </span> <span class="Delimiter">}</span> <span id="L1582" class="LineNr">1582 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-column:offset</span>, col <span id="L1583" class="LineNr">1583 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">before-cursor:offset</span>, curr @@ -1831,7 +1831,7 @@ if ('onhashchange' in window) { <span id="L1769" class="LineNr">1769 </span> <span class="Conceal">¦</span> <a href='003-shortcuts.mu.html#L1788'>move-to-end-of-line</a> editor <span id="L1770" class="LineNr">1770 </span> <span class="Conceal">¦</span> undo-coalesce-tag:num <span class="Special"><-</span> copy <span class="Constant">0/never</span> <span id="L1771" class="LineNr">1771 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <end-move-cursor></span> -<span id="L1772" class="LineNr">1772 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">0/don't-render</span> +<span id="L1772" class="LineNr">1772 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">0/don't-render</span> <span id="L1773" class="LineNr">1773 </span> <span class="Delimiter">}</span> <span id="L1774" class="LineNr">1774 </span>] <span id="L1775" class="LineNr">1775 </span> @@ -1843,7 +1843,7 @@ if ('onhashchange' in window) { <span id="L1781" class="LineNr">1781 </span> <span class="Conceal">¦</span> <a href='003-shortcuts.mu.html#L1788'>move-to-end-of-line</a> editor <span id="L1782" class="LineNr">1782 </span> <span class="Conceal">¦</span> undo-coalesce-tag:num <span class="Special"><-</span> copy <span class="Constant">0/never</span> <span id="L1783" class="LineNr">1783 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <end-move-cursor></span> -<span id="L1784" class="LineNr">1784 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">0/don't-render</span> +<span id="L1784" class="LineNr">1784 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">0/don't-render</span> <span id="L1785" class="LineNr">1785 </span> <span class="Delimiter">}</span> <span id="L1786" class="LineNr">1786 </span>] <span id="L1787" class="LineNr">1787 </span> @@ -1866,7 +1866,7 @@ if ('onhashchange' in window) { <span id="L1804" class="LineNr">1804 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-column:offset</span>, cursor-column <span id="L1805" class="LineNr">1805 </span> <span class="Conceal">¦</span> before-cursor <span class="Special"><-</span> copy <a href='../065duplex_list.mu.html#L25'>next</a> <span id="L1806" class="LineNr">1806 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">before-cursor:offset</span>, before-cursor -<span id="L1807" class="LineNr">1807 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L1807" class="LineNr">1807 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L1808" class="LineNr">1808 </span> <span class="Delimiter">}</span> <span id="L1809" class="LineNr">1809 </span>] <span id="L1810" class="LineNr">1810 </span> @@ -2026,7 +2026,7 @@ if ('onhashchange' in window) { <span id="L1964" class="LineNr">1964 </span> <span class="Conceal">¦</span> deleted-cells:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L2006'>delete-to-start-of-line</a> editor <span id="L1965" class="LineNr">1965 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <a href='003-shortcuts.mu.html#L1965'><end-delete-to-start-of-line></a></span> <span id="L1966" class="LineNr">1966 </span> <span class="Conceal">¦</span> go-render?:bool <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L1971'>minimal-render-for-ctrl-u</a> <a href='../081print.mu.html#L16'>screen</a>, editor, deleted-cells -<span id="L1967" class="LineNr">1967 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L1967" class="LineNr">1967 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L1968" class="LineNr">1968 </span> <span class="Delimiter">}</span> <span id="L1969" class="LineNr">1969 </span>] <span id="L1970" class="LineNr">1970 </span> @@ -2050,7 +2050,7 @@ if ('onhashchange' in window) { <span id="L1988" class="LineNr">1988 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> b <span id="L1989" class="LineNr">1989 </span> <span class="Conceal">¦</span> buf <span class="Special"><-</span> append buf, c <span id="L1990" class="LineNr">1990 </span> <span class="Conceal">¦</span> i <span class="Special"><-</span> add i,<span class="Constant"> 1</span> -<span id="L1991" class="LineNr">1991 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L1991" class="LineNr">1991 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L1992" class="LineNr">1992 </span> <span class="Delimiter">}</span> <span id="L1993" class="LineNr">1993 </span> <span class="Comment"># if the line used to be wrapped, give up and render the whole screen</span> <span id="L1994" class="LineNr">1994 </span> num-deleted-cells:num <span class="Special"><-</span> length deleted-cells @@ -2062,7 +2062,7 @@ if ('onhashchange' in window) { <span id="L2000" class="LineNr">2000 </span> curr-line:text <span class="Special"><-</span> <a href='../061text.mu.html#L338'>buffer-to-array</a> buf <span id="L2001" class="LineNr">2001 </span> curr-row:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-row:offset</span> <span id="L2002" class="LineNr">2002 </span> <a href='003-shortcuts.mu.html#L2062'>render-code</a> <a href='../081print.mu.html#L16'>screen</a>, curr-line, curr-column, right, curr-row -<span id="L2003" class="LineNr">2003 </span> <span class="muControl">return</span> <span class="Constant">0/dont-render</span> +<span id="L2003" class="LineNr">2003 </span> <span class="muControl"> return</span> <span class="Constant">0/dont-render</span> <span id="L2004" class="LineNr">2004 </span>] <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 [ @@ -2086,7 +2086,7 @@ if ('onhashchange' in window) { <span id="L2024" class="LineNr">2024 </span> <span class="Conceal">¦</span> update-top-of-screen?:bool <span class="Special"><-</span> or update-top-of-screen?, at-top-of-screen? <span id="L2025" class="LineNr">2025 </span> <span class="Conceal">¦</span> start <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L32'>prev</a> start <span id="L2026" class="LineNr">2026 </span> <span class="Conceal">¦</span> assert start, <span class="Constant">[delete-to-start-of-line tried to move before start of text]</span> -<span id="L2027" class="LineNr">2027 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L2027" class="LineNr">2027 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L2028" class="LineNr">2028 </span> <span class="Delimiter">}</span> <span id="L2029" class="LineNr">2029 </span> <span class="Comment"># snip it out</span> <span id="L2030" class="LineNr">2030 </span> result:&:<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 @@ -2150,13 +2150,13 @@ if ('onhashchange' in window) { <span id="L2088" class="LineNr">2088 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> space:char <span class="Special"><-</span> copy <span class="Constant">32/space</span> <span id="L2089" class="LineNr">2089 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> print <a href='../081print.mu.html#L16'>screen</a>, space <span id="L2090" class="LineNr">2090 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> column <span class="Special"><-</span> add column,<span class="Constant"> 1</span> -<span id="L2091" class="LineNr">2091 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L2091" class="LineNr">2091 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L2092" class="LineNr">2092 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L2093" class="LineNr">2093 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> row <span class="Special"><-</span> add row,<span class="Constant"> 1</span> <span id="L2094" class="LineNr">2094 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> column <span class="Special"><-</span> copy left <span id="L2095" class="LineNr">2095 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</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 <span id="L2096" class="LineNr">2096 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> i <span class="Special"><-</span> add i,<span class="Constant"> 1</span> -<span id="L2097" class="LineNr">2097 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> <span class="Constant">+next-character</span> +<span id="L2097" class="LineNr">2097 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span class="Constant">+next-character</span> <span id="L2098" class="LineNr">2098 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L2099" class="LineNr">2099 </span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> <span id="L2100" class="LineNr">2100 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Comment"># at right? wrap.</span> @@ -2169,12 +2169,12 @@ if ('onhashchange' in window) { <span id="L2107" class="LineNr">2107 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> row <span class="Special"><-</span> add row,<span class="Constant"> 1</span> <span id="L2108" class="LineNr">2108 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</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 <span id="L2109" class="LineNr">2109 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Comment"># don't increment i</span> -<span id="L2110" class="LineNr">2110 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> <span class="Constant">+next-character</span> +<span id="L2110" class="LineNr">2110 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span class="Constant">+next-character</span> <span id="L2111" class="LineNr">2111 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L2112" class="LineNr">2112 </span> <span class="Conceal">¦</span> i <span class="Special"><-</span> add i,<span class="Constant"> 1</span> <span id="L2113" class="LineNr">2113 </span> <span class="Conceal">¦</span> print <a href='../081print.mu.html#L16'>screen</a>, c, color <span id="L2114" class="LineNr">2114 </span> <span class="Conceal">¦</span> column <span class="Special"><-</span> add column,<span class="Constant"> 1</span> -<span id="L2115" class="LineNr">2115 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L2115" class="LineNr">2115 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L2116" class="LineNr">2116 </span> <span class="Delimiter">}</span> <span id="L2117" class="LineNr">2117 </span> was-at-left?:bool <span class="Special"><-</span> equal column, left <span id="L2118" class="LineNr">2118 </span> <a href='../081print.mu.html#L553'>clear-line-until</a> <a href='../081print.mu.html#L16'>screen</a>, right @@ -2604,7 +2604,7 @@ if ('onhashchange' in window) { <span id="L2542" class="LineNr">2542 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <a href='003-shortcuts.mu.html#L2542'><end-delete-to-end-of-line></a></span> <span id="L2543" class="LineNr">2543 </span> <span class="Conceal">¦</span> <span class="Comment"># checks if we can do a minimal render and if we can it will do a minimal render</span> <span id="L2544" class="LineNr">2544 </span> <span class="Conceal">¦</span> go-render?:bool <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L2549'>minimal-render-for-ctrl-k</a> <a href='../081print.mu.html#L16'>screen</a>, editor, deleted-cells -<span id="L2545" class="LineNr">2545 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L2545" class="LineNr">2545 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L2546" class="LineNr">2546 </span> <span class="Delimiter">}</span> <span id="L2547" class="LineNr">2547 </span>] <span id="L2548" class="LineNr">2548 </span> @@ -2623,7 +2623,7 @@ if ('onhashchange' in window) { <span id="L2561" class="LineNr">2561 </span> wrap?:bool <span class="Special"><-</span> greater-or-equal old-row-len, end <span id="L2562" class="LineNr">2562 </span> <span class="muControl">return-if</span> wrap?, <span class="Constant">1/go-render</span> <span id="L2563" class="LineNr">2563 </span> <a href='../081print.mu.html#L553'>clear-line-until</a> <a href='../081print.mu.html#L16'>screen</a>, right -<span id="L2564" class="LineNr">2564 </span> <span class="muControl">return</span> <span class="Constant">0/dont-render</span> +<span id="L2564" class="LineNr">2564 </span> <span class="muControl"> return</span> <span class="Constant">0/dont-render</span> <span id="L2565" class="LineNr">2565 </span>] <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 [ @@ -2639,7 +2639,7 @@ if ('onhashchange' in window) { <span id="L2577" class="LineNr">2577 </span> <span class="Conceal">¦</span> at-end-of-line?:bool <span class="Special"><-</span> equal curr, <span class="Constant">10/newline</span> <span id="L2578" class="LineNr">2578 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> at-end-of-line? <span id="L2579" class="LineNr">2579 </span> <span class="Conceal">¦</span> end <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> end -<span id="L2580" class="LineNr">2580 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L2580" class="LineNr">2580 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L2581" class="LineNr">2581 </span> <span class="Delimiter">}</span> <span id="L2582" class="LineNr">2582 </span> <span class="Comment"># snip it out</span> <span id="L2583" class="LineNr">2583 </span> result <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> start @@ -2885,10 +2885,10 @@ if ('onhashchange' in window) { <span id="L2823" class="LineNr">2823 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> at-newline? <span id="L2824" class="LineNr">2824 </span> <span class="Conceal">¦</span> curr <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> curr <span id="L2825" class="LineNr">2825 </span> <span class="Conceal">¦</span> count <span class="Special"><-</span> add count,<span class="Constant"> 1</span> -<span id="L2826" class="LineNr">2826 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L2826" class="LineNr">2826 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L2827" class="LineNr">2827 </span> <span class="Delimiter">}</span> <span id="L2828" class="LineNr">2828 </span> <span class="muControl">return-unless</span> curr, original -<span id="L2829" class="LineNr">2829 </span> <span class="muControl">return</span> curr +<span id="L2829" class="LineNr">2829 </span> <span class="muControl"> return</span> curr <span id="L2830" class="LineNr">2830 </span>] <span id="L2831" class="LineNr">2831 </span> <span id="L2832" class="LineNr">2832 </span><span class="muScenario">scenario</span> editor-scrolls-down-past-wrapped-line-using-arrow-keys [ @@ -3252,7 +3252,7 @@ if ('onhashchange' in window) { <span id="L3190" class="LineNr">3190 </span> <span class="Conceal">¦</span> <span class="Comment"># empty line; just skip this newline</span> <span id="L3191" class="LineNr">3191 </span> <span class="Conceal">¦</span> <a href='../065duplex_list.mu.html#L32'>prev</a>:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L32'>prev</a> curr <span id="L3192" class="LineNr">3192 </span> <span class="Conceal">¦</span> <span class="muControl">return-unless</span> <a href='../065duplex_list.mu.html#L32'>prev</a>, curr -<span id="L3193" class="LineNr">3193 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <a href='../065duplex_list.mu.html#L32'>prev</a> +<span id="L3193" class="LineNr">3193 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <a href='../065duplex_list.mu.html#L32'>prev</a> <span id="L3194" class="LineNr">3194 </span> <span class="Delimiter">}</span> <span id="L3195" class="LineNr">3195 </span> _, max:num <span class="Special"><-</span> divide-with-remainder len, max-line-length <span id="L3196" class="LineNr">3196 </span> <span class="Comment"># remainder 0 => scan one width-worth</span> @@ -3270,9 +3270,9 @@ if ('onhashchange' in window) { <span id="L3208" class="LineNr">3208 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> <a href='../065duplex_list.mu.html#L32'>prev</a> <span id="L3209" class="LineNr">3209 </span> <span class="Conceal">¦</span> curr <span class="Special"><-</span> copy <a href='../065duplex_list.mu.html#L32'>prev</a> <span id="L3210" class="LineNr">3210 </span> <span class="Conceal">¦</span> count <span class="Special"><-</span> add count,<span class="Constant"> 1</span> -<span id="L3211" class="LineNr">3211 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L3211" class="LineNr">3211 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L3212" class="LineNr">3212 </span> <span class="Delimiter">}</span> -<span id="L3213" class="LineNr">3213 </span> <span class="muControl">return</span> curr +<span id="L3213" class="LineNr">3213 </span> <span class="muControl"> return</span> curr <span id="L3214" class="LineNr">3214 </span>] <span id="L3215" class="LineNr">3215 </span> <span id="L3216" class="LineNr">3216 </span><span class="muScenario">scenario</span> editor-scrolls-up-past-wrapped-line-using-arrow-keys [ @@ -3635,7 +3635,7 @@ if ('onhashchange' in window) { <span id="L3573" class="LineNr">3573 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <end-move-cursor></span> <span id="L3574" class="LineNr">3574 </span> <span class="Conceal">¦</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> <span id="L3575" class="LineNr">3575 </span> <span class="Conceal">¦</span> movement?:bool <span class="Special"><-</span> not-equal top-of-screen, old-top -<span id="L3576" class="LineNr">3576 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> movement?/go-render +<span id="L3576" class="LineNr">3576 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> movement?/go-render <span id="L3577" class="LineNr">3577 </span> <span class="Delimiter">}</span> <span id="L3578" class="LineNr">3578 </span>] <span id="L3579" class="LineNr">3579 </span> @@ -3650,7 +3650,7 @@ if ('onhashchange' in window) { <span id="L3588" class="LineNr">3588 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <end-move-cursor></span> <span id="L3589" class="LineNr">3589 </span> <span class="Conceal">¦</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> <span id="L3590" class="LineNr">3590 </span> <span class="Conceal">¦</span> movement?:bool <span class="Special"><-</span> not-equal top-of-screen, old-top -<span id="L3591" class="LineNr">3591 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> movement?/go-render +<span id="L3591" class="LineNr">3591 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> movement?/go-render <span id="L3592" class="LineNr">3592 </span> <span class="Delimiter">}</span> <span id="L3593" class="LineNr">3593 </span>] <span id="L3594" class="LineNr">3594 </span> @@ -3701,7 +3701,7 @@ if ('onhashchange' in window) { <span id="L3639" class="LineNr">3639 </span> <span class="Conceal">¦</span> before-cursor <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L32'>prev</a> before-cursor <span id="L3640" class="LineNr">3640 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">before-cursor:offset</span>, before-cursor <span id="L3641" class="LineNr">3641 </span> <span class="Conceal">¦</span> assert before-cursor, <span class="Constant">[move-to-start-of-line tried to move before start of text]</span> -<span id="L3642" class="LineNr">3642 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L3642" class="LineNr">3642 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L3643" class="LineNr">3643 </span> <span class="Delimiter">}</span> <span id="L3644" class="LineNr">3644 </span>] <span id="L3645" class="LineNr">3645 </span> @@ -3859,7 +3859,7 @@ if ('onhashchange' in window) { <span id="L3797" class="LineNr">3797 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <end-move-cursor></span> <span id="L3798" class="LineNr">3798 </span> <span class="Conceal">¦</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> <span id="L3799" class="LineNr">3799 </span> <span class="Conceal">¦</span> movement?:bool <span class="Special"><-</span> not-equal top-of-screen, old-top -<span id="L3800" class="LineNr">3800 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> movement?/go-render +<span id="L3800" class="LineNr">3800 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> movement?/go-render <span id="L3801" class="LineNr">3801 </span> <span class="Delimiter">}</span> <span id="L3802" class="LineNr">3802 </span>] <span id="L3803" class="LineNr">3803 </span> @@ -3875,7 +3875,7 @@ if ('onhashchange' in window) { <span id="L3813" class="LineNr">3813 </span> <span class="Conceal">¦</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> <span id="L3814" class="LineNr">3814 </span> <span class="Conceal">¦</span> movement?:bool <span class="Special"><-</span> not-equal top-of-screen, old-top <span id="L3815" class="LineNr">3815 </span> <span class="Conceal">¦</span> <span class="Comment"># don't bother re-rendering if nothing changed. todo: test this</span> -<span id="L3816" class="LineNr">3816 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> movement?/go-render +<span id="L3816" class="LineNr">3816 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> movement?/go-render <span id="L3817" class="LineNr">3817 </span> <span class="Delimiter">}</span> <span id="L3818" class="LineNr">3818 </span>] <span id="L3819" class="LineNr">3819 </span> @@ -3893,7 +3893,7 @@ if ('onhashchange' in window) { <span id="L3831" class="LineNr">3831 </span> <span class="Conceal">¦</span> top-of-screen <span class="Special"><-</span> copy <a href='../065duplex_list.mu.html#L32'>prev</a> <span id="L3832" class="LineNr">3832 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">top-of-screen:offset</span>, top-of-screen <span id="L3833" class="LineNr">3833 </span> <span class="Conceal">¦</span> count <span class="Special"><-</span> add count,<span class="Constant"> 1</span> -<span id="L3834" class="LineNr">3834 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L3834" class="LineNr">3834 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L3835" class="LineNr">3835 </span> <span class="Delimiter">}</span> <span id="L3836" class="LineNr">3836 </span>] <span id="L3837" class="LineNr">3837 </span> @@ -4204,7 +4204,7 @@ if ('onhashchange' in window) { <span id="L4142" class="LineNr">4142 </span> <span class="Conceal">¦</span> go-render?:bool, editor <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L4149'>line-up</a> editor, <a href='../081print.mu.html#L782'>screen-height</a> <span id="L4143" class="LineNr">4143 </span> <span class="Conceal">¦</span> undo-coalesce-tag:num <span class="Special"><-</span> copy <span class="Constant">5/line-up</span> <span id="L4144" class="LineNr">4144 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <end-move-cursor></span> -<span id="L4145" class="LineNr">4145 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> go-render? +<span id="L4145" class="LineNr">4145 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> go-render? <span id="L4146" class="LineNr">4146 </span> <span class="Delimiter">}</span> <span id="L4147" class="LineNr">4147 </span>] <span id="L4148" class="LineNr">4148 </span> @@ -4221,7 +4221,7 @@ if ('onhashchange' in window) { <span id="L4159" class="LineNr">4159 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> movement? <span id="L4160" class="LineNr">4160 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">top-of-screen:offset</span>, new-top <span id="L4161" class="LineNr">4161 </span> <span class="Delimiter">}</span> -<span id="L4162" class="LineNr">4162 </span> <span class="muControl">return</span> movement? +<span id="L4162" class="LineNr">4162 </span> <span class="muControl"> return</span> movement? <span id="L4163" class="LineNr">4163 </span>] <span id="L4164" class="LineNr">4164 </span> <span id="L4165" class="LineNr">4165 </span><span class="Comment"># ctrl-x - scroll down by one line</span> @@ -4235,7 +4235,7 @@ if ('onhashchange' in window) { <span id="L4173" class="LineNr">4173 </span> <span class="Conceal">¦</span> go-render?:bool, editor <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L4180'>line-down</a> editor, <a href='../081print.mu.html#L782'>screen-height</a> <span id="L4174" class="LineNr">4174 </span> <span class="Conceal">¦</span> undo-coalesce-tag:num <span class="Special"><-</span> copy <span class="Constant">6/line-down</span> <span id="L4175" class="LineNr">4175 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <end-move-cursor></span> -<span id="L4176" class="LineNr">4176 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> go-render? +<span id="L4176" class="LineNr">4176 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> go-render? <span id="L4177" class="LineNr">4177 </span> <span class="Delimiter">}</span> <span id="L4178" class="LineNr">4178 </span>] <span id="L4179" class="LineNr">4179 </span> @@ -4249,7 +4249,7 @@ if ('onhashchange' in window) { <span id="L4187" class="LineNr">4187 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> movement? <span id="L4188" class="LineNr">4188 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">top-of-screen:offset</span>, new-top <span id="L4189" class="LineNr">4189 </span> <span class="Delimiter">}</span> -<span id="L4190" class="LineNr">4190 </span> <span class="muControl">return</span> movement? +<span id="L4190" class="LineNr">4190 </span> <span class="muControl"> return</span> movement? <span id="L4191" class="LineNr">4191 </span>] <span id="L4192" class="LineNr">4192 </span> <span id="L4193" class="LineNr">4193 </span><span class="Comment"># ctrl-t - move current line to top of screen</span> @@ -4269,7 +4269,7 @@ if ('onhashchange' in window) { <span id="L4207" class="LineNr">4207 </span> <span class="Conceal">¦</span> go-render?:bool <span class="Special"><-</span> not-equal new-top, old-top <span id="L4208" class="LineNr">4208 </span> <span class="Conceal">¦</span> undo-coalesce-tag:num <span class="Special"><-</span> copy <span class="Constant">0/never</span> <span id="L4209" class="LineNr">4209 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <end-move-cursor></span> -<span id="L4210" class="LineNr">4210 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> go-render? +<span id="L4210" class="LineNr">4210 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> go-render? <span id="L4211" class="LineNr">4211 </span> <span class="Delimiter">}</span> <span id="L4212" class="LineNr">4212 </span>] <span id="L4213" class="LineNr">4213 </span> @@ -4302,7 +4302,7 @@ if ('onhashchange' in window) { <span id="L4240" class="LineNr">4240 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> go-render? <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L4250'>render-line-from-start</a> <a href='../081print.mu.html#L16'>screen</a>, editor,<span class="Constant"> 0</span> <span id="L4241" class="LineNr">4241 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L4242" class="LineNr">4242 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <end-insert-character></span> -<span id="L4243" class="LineNr">4243 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L4243" class="LineNr">4243 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L4244" class="LineNr">4244 </span> <span class="Delimiter">}</span> <span id="L4245" class="LineNr">4245 </span>] <span id="L4246" class="LineNr">4246 </span> @@ -4333,10 +4333,10 @@ if ('onhashchange' in window) { <span id="L4271" class="LineNr">4271 </span> <span class="Conceal">¦</span> print <a href='../081print.mu.html#L16'>screen</a>, c, color <span id="L4272" class="LineNr">4272 </span> <span class="Conceal">¦</span> curr <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> curr <span id="L4273" class="LineNr">4273 </span> <span class="Conceal">¦</span> i <span class="Special"><-</span> add i,<span class="Constant"> 1</span> -<span id="L4274" class="LineNr">4274 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L4274" class="LineNr">4274 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L4275" class="LineNr">4275 </span> <span class="Delimiter">}</span> <span id="L4276" class="LineNr">4276 </span> <a href='../081print.mu.html#L553'>clear-line-until</a> <a href='../081print.mu.html#L16'>screen</a>, right -<span id="L4277" class="LineNr">4277 </span> <span class="muControl">return</span> <span class="Constant">0/dont-render</span> +<span id="L4277" class="LineNr">4277 </span> <span class="muControl"> return</span> <span class="Constant">0/dont-render</span> <span id="L4278" class="LineNr">4278 </span>] <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 [ |