diff options
Diffstat (limited to 'html/edit/003-shortcuts.mu.html')
-rw-r--r-- | html/edit/003-shortcuts.mu.html | 458 |
1 files changed, 229 insertions, 229 deletions
diff --git a/html/edit/003-shortcuts.mu.html b/html/edit/003-shortcuts.mu.html index 4f616c07..1a19ad63 100644 --- a/html/edit/003-shortcuts.mu.html +++ b/html/edit/003-shortcuts.mu.html @@ -73,7 +73,7 @@ if ('onhashchange' in window) { <span id="L15" class="LineNr"> 15 </span> press tab <span id="L16" class="LineNr"> 16 </span> ] <span id="L17" class="LineNr"> 17 </span> run [ -<span id="L18" class="LineNr"> 18 </span> editor-event-loop screen, console, e +<span id="L18" class="LineNr"> 18 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L19" class="LineNr"> 19 </span> ] <span id="L20" class="LineNr"> 20 </span> screen-should-contain [ <span id="L21" class="LineNr"> 21 </span> <span class="Constant"> . .</span> @@ -87,8 +87,8 @@ if ('onhashchange' in window) { <span id="L29" class="LineNr"> 29 </span> tab?:bool <span class="Special"><-</span> equal c, <span class="Constant">9/tab</span> <span id="L30" class="LineNr"> 30 </span> <span class="muControl">break-unless</span> tab? <span id="L31" class="LineNr"> 31 </span><span class="Constant"> <insert-character-begin></span> -<span id="L32" class="LineNr"> 32 </span> insert-at-cursor editor, <span class="Constant">32/space</span>, screen -<span id="L33" class="LineNr"> 33 </span> insert-at-cursor editor, <span class="Constant">32/space</span>, screen +<span id="L32" class="LineNr"> 32 </span> insert-at-cursor editor, <span class="Constant">32/space</span>, <a href='081print.mu.html#L4'>screen</a> +<span id="L33" class="LineNr"> 33 </span> insert-at-cursor editor, <span class="Constant">32/space</span>, <a href='081print.mu.html#L4'>screen</a> <span id="L34" class="LineNr"> 34 </span><span class="Constant"> <insert-character-end></span> <span id="L35" class="LineNr"> 35 </span> <span class="muControl">return</span> <span class="Constant">1/go-render</span> <span id="L36" class="LineNr"> 36 </span> <span class="Delimiter">}</span> @@ -100,14 +100,14 @@ if ('onhashchange' in window) { <span id="L42" class="LineNr"> 42 </span> <span class="Constant">local-scope</span> <span id="L43" class="LineNr"> 43 </span> assume-screen <span class="Constant">10/width</span>, <span class="Constant">5/height</span> <span id="L44" class="LineNr"> 44 </span> e:&:editor <span class="Special"><-</span> new-editor <span class="Constant">[abc]</span>, <span class="Constant">0/left</span>, <span class="Constant">10/right</span> -<span id="L45" class="LineNr"> 45 </span> editor-render screen, e +<span id="L45" class="LineNr"> 45 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L46" class="LineNr"> 46 </span> $clear-trace <span id="L47" class="LineNr"> 47 </span> assume-console [ <span id="L48" class="LineNr"> 48 </span> left-click<span class="Constant"> 1</span>,<span class="Constant"> 1</span> <span id="L49" class="LineNr"> 49 </span> press backspace <span id="L50" class="LineNr"> 50 </span> ] <span id="L51" class="LineNr"> 51 </span> run [ -<span id="L52" class="LineNr"> 52 </span> editor-event-loop screen, console, e +<span id="L52" class="LineNr"> 52 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L53" class="LineNr"> 53 </span> 4:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-row:offset</span> <span id="L54" class="LineNr"> 54 </span> 5:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-column:offset</span> <span id="L55" class="LineNr"> 55 </span> ] @@ -129,7 +129,7 @@ if ('onhashchange' in window) { <span id="L71" class="LineNr"> 71 </span> delete-previous-character?:bool <span class="Special"><-</span> equal c, <span class="Constant">8/backspace</span> <span id="L72" class="LineNr"> 72 </span> <span class="muControl">break-unless</span> delete-previous-character? <span id="L73" class="LineNr"> 73 </span><span class="Constant"> <backspace-character-begin></span> -<span id="L74" class="LineNr"> 74 </span> go-render?:bool, backspaced-cell:&:duplex-list:char <span class="Special"><-</span> delete-before-cursor editor, screen +<span id="L74" class="LineNr"> 74 </span> go-render?:bool, backspaced-cell:&:duplex-list:char <span class="Special"><-</span> delete-before-cursor editor, <a href='081print.mu.html#L4'>screen</a> <span id="L75" class="LineNr"> 75 </span><span class="Constant"> <backspace-character-end></span> <span id="L76" class="LineNr"> 76 </span> <span class="muControl">return</span> <span id="L77" class="LineNr"> 77 </span> <span class="Delimiter">}</span> @@ -138,23 +138,23 @@ if ('onhashchange' in window) { <span id="L80" class="LineNr"> 80 </span><span class="Comment"># return values:</span> <span id="L81" class="LineNr"> 81 </span><span class="Comment"># go-render? - whether caller needs to update the screen</span> <span id="L82" class="LineNr"> 82 </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="L83" class="LineNr"> 83 </span><span class="muRecipe">def</span> delete-before-cursor editor:&:editor, screen:&:screen<span class="muRecipe"> -> </span>go-render?:bool, backspaced-cell:&:duplex-list:char, editor:&:editor, screen:&:screen [ +<span id="L83" class="LineNr"> 83 </span><span class="muRecipe">def</span> delete-before-cursor editor:&:editor, <a href='081print.mu.html#L4'>screen</a>:&:<a href='081print.mu.html#L4'>screen</a><span class="muRecipe"> -> </span>go-render?:bool, backspaced-cell:&:duplex-list:char, editor:&:editor, <a href='081print.mu.html#L4'>screen</a>:&:<a href='081print.mu.html#L4'>screen</a> [ <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="L86" class="LineNr"> 86 </span> before-cursor:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> <span id="L87" class="LineNr"> 87 </span> data:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">data:offset</span> <span id="L88" class="LineNr"> 88 </span> <span class="Comment"># if at start of text (before-cursor at § sentinel), return</span> -<span id="L89" class="LineNr"> 89 </span> prev:&:duplex-list:char <span class="Special"><-</span> prev before-cursor -<span id="L90" class="LineNr"> 90 </span> <span class="muControl">return-unless</span> prev, <span class="Constant">0/no-more-render</span>, <span class="Constant">0/nothing-deleted</span> +<span id="L89" class="LineNr"> 89 </span> <a href='065duplex_list.mu.html#L36'>prev</a>:&:duplex-list:char <span class="Special"><-</span> <a href='065duplex_list.mu.html#L36'>prev</a> before-cursor +<span id="L90" class="LineNr"> 90 </span> <span class="muControl">return-unless</span> <a href='065duplex_list.mu.html#L36'>prev</a>, <span class="Constant">0/no-more-render</span>, <span class="Constant">0/nothing-deleted</span> <span id="L91" class="LineNr"> 91 </span> trace<span class="Constant"> 10</span>, <span class="Constant">[app]</span>, <span class="Constant">[delete-before-cursor]</span> <span id="L92" class="LineNr"> 92 </span> original-row:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-row:offset</span> <span id="L93" class="LineNr"> 93 </span> scroll?:bool <span class="Special"><-</span> move-cursor-coordinates-left editor <span id="L94" class="LineNr"> 94 </span> backspaced-cell:&:duplex-list:char <span class="Special"><-</span> copy before-cursor <span id="L95" class="LineNr"> 95 </span> data <span class="Special"><-</span> remove before-cursor, data <span class="Comment"># will also neatly trim next/prev pointers in backspaced-cell/before-cursor</span> -<span id="L96" class="LineNr"> 96 </span> before-cursor <span class="Special"><-</span> copy prev +<span id="L96" class="LineNr"> 96 </span> before-cursor <span class="Special"><-</span> copy <a href='065duplex_list.mu.html#L36'>prev</a> <span id="L97" class="LineNr"> 97 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">before-cursor:offset</span>, before-cursor <span id="L98" class="LineNr"> 98 </span> <span class="muControl">return-if</span> scroll?, <span class="Constant">1/go-render</span> -<span id="L99" class="LineNr"> 99 </span> screen-width:num <span class="Special"><-</span> screen-width screen +<span id="L99" class="LineNr"> 99 </span> <a href='081print.mu.html#L581'>screen-width</a>:num <span class="Special"><-</span> <a href='081print.mu.html#L581'>screen-width</a> <a href='081print.mu.html#L4'>screen</a> <span id="L100" class="LineNr"> 100 </span> cursor-row:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-row:offset</span> <span id="L101" class="LineNr"> 101 </span> cursor-column:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-column:offset</span> <span id="L102" class="LineNr"> 102 </span> <span class="Comment"># did we just backspace over a newline?</span> @@ -162,8 +162,8 @@ if ('onhashchange' in window) { <span id="L104" class="LineNr"> 104 </span> <span class="muControl">return-unless</span> same-row?, <span class="Constant">1/go-render</span> <span id="L105" class="LineNr"> 105 </span> left:num <span class="Special"><-</span> get *editor, <span class="Constant">left:offset</span> <span id="L106" class="LineNr"> 106 </span> right:num <span class="Special"><-</span> get *editor, <span class="Constant">right:offset</span> -<span id="L107" class="LineNr"> 107 </span> curr:&:duplex-list:char <span class="Special"><-</span> next before-cursor -<span id="L108" class="LineNr"> 108 </span> screen <span class="Special"><-</span> move-cursor screen, cursor-row, cursor-column +<span id="L107" class="LineNr"> 107 </span> curr:&:duplex-list:char <span class="Special"><-</span> <a href='065duplex_list.mu.html#L29'>next</a> before-cursor +<span id="L108" class="LineNr"> 108 </span> <a href='081print.mu.html#L4'>screen</a> <span class="Special"><-</span> <a href='081print.mu.html#L442'>move-cursor</a> <a href='081print.mu.html#L4'>screen</a>, cursor-row, cursor-column <span id="L109" class="LineNr"> 109 </span> curr-column:num <span class="Special"><-</span> copy cursor-column <span id="L110" class="LineNr"> 110 </span> <span class="Delimiter">{</span> <span id="L111" class="LineNr"> 111 </span> <span class="Comment"># hit right margin? give up and let caller render</span> @@ -174,14 +174,14 @@ if ('onhashchange' in window) { <span id="L116" class="LineNr"> 116 </span> currc:char <span class="Special"><-</span> get *curr, <span class="Constant">value:offset</span> <span id="L117" class="LineNr"> 117 </span> at-newline?:bool <span class="Special"><-</span> equal currc, <span class="Constant">10/newline</span> <span id="L118" class="LineNr"> 118 </span> <span class="muControl">break-if</span> at-newline? -<span id="L119" class="LineNr"> 119 </span> screen <span class="Special"><-</span> print screen, currc +<span id="L119" class="LineNr"> 119 </span> <a href='081print.mu.html#L4'>screen</a> <span class="Special"><-</span> print <a href='081print.mu.html#L4'>screen</a>, currc <span id="L120" class="LineNr"> 120 </span> curr-column <span class="Special"><-</span> add curr-column,<span class="Constant"> 1</span> -<span id="L121" class="LineNr"> 121 </span> curr <span class="Special"><-</span> next curr +<span id="L121" class="LineNr"> 121 </span> curr <span class="Special"><-</span> <a href='065duplex_list.mu.html#L29'>next</a> curr <span id="L122" class="LineNr"> 122 </span> <span class="muControl">loop</span> <span id="L123" class="LineNr"> 123 </span> <span class="Delimiter">}</span> <span id="L124" class="LineNr"> 124 </span> <span class="Comment"># we're guaranteed not to be at the right margin</span> <span id="L125" class="LineNr"> 125 </span> space:char <span class="Special"><-</span> copy <span class="Constant">32/space</span> -<span id="L126" class="LineNr"> 126 </span> screen <span class="Special"><-</span> print screen, space +<span id="L126" class="LineNr"> 126 </span> <a href='081print.mu.html#L4'>screen</a> <span class="Special"><-</span> print <a href='081print.mu.html#L4'>screen</a>, space <span id="L127" class="LineNr"> 127 </span> go-render? <span class="Special"><-</span> copy <span class="Constant">0/false</span> <span id="L128" class="LineNr"> 128 </span>] <span id="L129" class="LineNr"> 129 </span> @@ -256,7 +256,7 @@ if ('onhashchange' in window) { <span id="L198" class="LineNr"> 198 </span> at-start?:bool <span class="Special"><-</span> equal curr, start <span id="L199" class="LineNr"> 199 </span> <span class="muControl">return-if</span> at-start? <span id="L200" class="LineNr"> 200 </span> <span class="Delimiter">{</span> -<span id="L201" class="LineNr"> 201 </span> curr <span class="Special"><-</span> prev curr +<span id="L201" class="LineNr"> 201 </span> curr <span class="Special"><-</span> <a href='065duplex_list.mu.html#L36'>prev</a> curr <span id="L202" class="LineNr"> 202 </span> <span class="muControl">break-unless</span> curr <span id="L203" class="LineNr"> 203 </span> at-start?:bool <span class="Special"><-</span> equal curr, start <span id="L204" class="LineNr"> 204 </span> <span class="muControl">break-if</span> at-start? @@ -280,7 +280,7 @@ if ('onhashchange' in window) { <span id="L222" class="LineNr"> 222 </span> press backspace <span id="L223" class="LineNr"> 223 </span> ] <span id="L224" class="LineNr"> 224 </span> run [ -<span id="L225" class="LineNr"> 225 </span> editor-event-loop screen, console, e +<span id="L225" class="LineNr"> 225 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L226" class="LineNr"> 226 </span> 4:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-row:offset</span> <span id="L227" class="LineNr"> 227 </span> 5:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-column:offset</span> <span id="L228" class="LineNr"> 228 </span> ] @@ -303,7 +303,7 @@ if ('onhashchange' in window) { <span id="L245" class="LineNr"> 245 </span> s:text <span class="Special"><-</span> new <span class="Constant">[abc def</span> <span id="L246" class="LineNr"> 246 </span><span class="Constant">ghi jkl]</span> <span id="L247" class="LineNr"> 247 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">10/right</span> -<span id="L248" class="LineNr"> 248 </span> editor-render screen, e +<span id="L248" class="LineNr"> 248 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L249" class="LineNr"> 249 </span> $clear-trace <span id="L250" class="LineNr"> 250 </span> <span class="Comment"># position the cursor at the start of the second and hit backspace</span> <span id="L251" class="LineNr"> 251 </span> assume-console [ @@ -311,7 +311,7 @@ if ('onhashchange' in window) { <span id="L253" class="LineNr"> 253 </span> press backspace <span id="L254" class="LineNr"> 254 </span> ] <span id="L255" class="LineNr"> 255 </span> run [ -<span id="L256" class="LineNr"> 256 </span> editor-event-loop screen, console, e +<span id="L256" class="LineNr"> 256 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L257" class="LineNr"> 257 </span> ] <span id="L258" class="LineNr"> 258 </span> <span class="Comment"># resulting single line should wrap correctly</span> <span id="L259" class="LineNr"> 259 </span> screen-should-contain [ @@ -328,7 +328,7 @@ if ('onhashchange' in window) { <span id="L270" class="LineNr"> 270 </span> assume-screen <span class="Constant">10/width</span>, <span class="Constant">5/height</span> <span id="L271" class="LineNr"> 271 </span> <span class="Comment"># initialize editor in part of the screen with a long line</span> <span id="L272" class="LineNr"> 272 </span> e:&:editor <span class="Special"><-</span> new-editor <span class="Constant">[abc def ghij]</span>, <span class="Constant">0/left</span>, <span class="Constant">8/right</span> -<span id="L273" class="LineNr"> 273 </span> editor-render screen, e +<span id="L273" class="LineNr"> 273 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L274" class="LineNr"> 274 </span> <span class="Comment"># confirm that it wraps</span> <span id="L275" class="LineNr"> 275 </span> screen-should-contain [ <span id="L276" class="LineNr"> 276 </span> <span class="Constant"> . .</span> @@ -343,7 +343,7 @@ if ('onhashchange' in window) { <span id="L285" class="LineNr"> 285 </span> press backspace <span id="L286" class="LineNr"> 286 </span> ] <span id="L287" class="LineNr"> 287 </span> run [ -<span id="L288" class="LineNr"> 288 </span> editor-event-loop screen, console, e +<span id="L288" class="LineNr"> 288 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L289" class="LineNr"> 289 </span> ] <span id="L290" class="LineNr"> 290 </span> <span class="Comment"># resulting single line should wrap correctly and not overflow its bounds</span> <span id="L291" class="LineNr"> 291 </span> screen-should-contain [ @@ -361,13 +361,13 @@ if ('onhashchange' in window) { <span id="L303" class="LineNr"> 303 </span> <span class="Constant">local-scope</span> <span id="L304" class="LineNr"> 304 </span> assume-screen <span class="Constant">10/width</span>, <span class="Constant">5/height</span> <span id="L305" class="LineNr"> 305 </span> e:&:editor <span class="Special"><-</span> new-editor <span class="Constant">[abc]</span>, <span class="Constant">0/left</span>, <span class="Constant">10/right</span> -<span id="L306" class="LineNr"> 306 </span> editor-render screen, e +<span id="L306" class="LineNr"> 306 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L307" class="LineNr"> 307 </span> $clear-trace <span id="L308" class="LineNr"> 308 </span> assume-console [ <span id="L309" class="LineNr"> 309 </span> press delete <span id="L310" class="LineNr"> 310 </span> ] <span id="L311" class="LineNr"> 311 </span> run [ -<span id="L312" class="LineNr"> 312 </span> editor-event-loop screen, console, e +<span id="L312" class="LineNr"> 312 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L313" class="LineNr"> 313 </span> ] <span id="L314" class="LineNr"> 314 </span> screen-should-contain [ <span id="L315" class="LineNr"> 315 </span> <span class="Constant"> . .</span> @@ -381,7 +381,7 @@ if ('onhashchange' in window) { <span id="L323" class="LineNr"> 323 </span> press delete <span id="L324" class="LineNr"> 324 </span> ] <span id="L325" class="LineNr"> 325 </span> run [ -<span id="L326" class="LineNr"> 326 </span> editor-event-loop screen, console, e +<span id="L326" class="LineNr"> 326 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L327" class="LineNr"> 327 </span> ] <span id="L328" class="LineNr"> 328 </span> screen-should-contain [ <span id="L329" class="LineNr"> 329 </span> <span class="Constant"> . .</span> @@ -397,47 +397,47 @@ if ('onhashchange' in window) { <span id="L339" class="LineNr"> 339 </span> delete-next-character?:bool <span class="Special"><-</span> equal k, <span class="Constant">65522/delete</span> <span id="L340" class="LineNr"> 340 </span> <span class="muControl">break-unless</span> delete-next-character? <span id="L341" class="LineNr"> 341 </span><span class="Constant"> <delete-character-begin></span> -<span id="L342" class="LineNr"> 342 </span> go-render?:bool, deleted-cell:&:duplex-list:char <span class="Special"><-</span> delete-at-cursor editor, screen +<span id="L342" class="LineNr"> 342 </span> go-render?:bool, deleted-cell:&:duplex-list:char <span class="Special"><-</span> delete-at-cursor editor, <a href='081print.mu.html#L4'>screen</a> <span id="L343" class="LineNr"> 343 </span><span class="Constant"> <delete-character-end></span> <span id="L344" class="LineNr"> 344 </span> <span class="muControl">return</span> <span id="L345" class="LineNr"> 345 </span> <span class="Delimiter">}</span> <span id="L346" class="LineNr"> 346 </span>] <span id="L347" class="LineNr"> 347 </span> -<span id="L348" class="LineNr"> 348 </span><span class="muRecipe">def</span> delete-at-cursor editor:&:editor, screen:&:screen<span class="muRecipe"> -> </span>go-render?:bool, deleted-cell:&:duplex-list:char, editor:&:editor, screen:&:screen [ +<span id="L348" class="LineNr"> 348 </span><span class="muRecipe">def</span> delete-at-cursor editor:&:editor, <a href='081print.mu.html#L4'>screen</a>:&:<a href='081print.mu.html#L4'>screen</a><span class="muRecipe"> -> </span>go-render?:bool, deleted-cell:&:duplex-list:char, editor:&:editor, <a href='081print.mu.html#L4'>screen</a>:&:<a href='081print.mu.html#L4'>screen</a> [ <span id="L349" class="LineNr"> 349 </span> <span class="Constant">local-scope</span> <span id="L350" class="LineNr"> 350 </span> <span class="Constant">load-ingredients</span> <span id="L351" class="LineNr"> 351 </span> before-cursor:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> <span id="L352" class="LineNr"> 352 </span> data:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">data:offset</span> -<span id="L353" class="LineNr"> 353 </span> deleted-cell:&:duplex-list:char <span class="Special"><-</span> next before-cursor +<span id="L353" class="LineNr"> 353 </span> deleted-cell:&:duplex-list:char <span class="Special"><-</span> <a href='065duplex_list.mu.html#L29'>next</a> before-cursor <span id="L354" class="LineNr"> 354 </span> <span class="muControl">return-unless</span> deleted-cell, <span class="Constant">0/don't-render</span> <span id="L355" class="LineNr"> 355 </span> currc:char <span class="Special"><-</span> get *deleted-cell, <span class="Constant">value:offset</span> <span id="L356" class="LineNr"> 356 </span> data <span class="Special"><-</span> remove deleted-cell, data <span id="L357" class="LineNr"> 357 </span> deleted-newline?:bool <span class="Special"><-</span> equal currc, <span class="Constant">10/newline</span> <span id="L358" class="LineNr"> 358 </span> <span class="muControl">return-if</span> deleted-newline?, <span class="Constant">1/go-render</span> <span id="L359" class="LineNr"> 359 </span> <span class="Comment"># wasn't a newline? render rest of line</span> -<span id="L360" class="LineNr"> 360 </span> curr:&:duplex-list:char <span class="Special"><-</span> next before-cursor <span class="Comment"># refresh after remove above</span> +<span id="L360" class="LineNr"> 360 </span> curr:&:duplex-list:char <span class="Special"><-</span> <a href='065duplex_list.mu.html#L29'>next</a> before-cursor <span class="Comment"># refresh after remove above</span> <span id="L361" class="LineNr"> 361 </span> cursor-row:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-row:offset</span> <span id="L362" class="LineNr"> 362 </span> cursor-column:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-column:offset</span> -<span id="L363" class="LineNr"> 363 </span> screen <span class="Special"><-</span> move-cursor screen, cursor-row, cursor-column +<span id="L363" class="LineNr"> 363 </span> <a href='081print.mu.html#L4'>screen</a> <span class="Special"><-</span> <a href='081print.mu.html#L442'>move-cursor</a> <a href='081print.mu.html#L4'>screen</a>, cursor-row, cursor-column <span id="L364" class="LineNr"> 364 </span> curr-column:num <span class="Special"><-</span> copy cursor-column -<span id="L365" class="LineNr"> 365 </span> screen-width:num <span class="Special"><-</span> screen-width screen +<span id="L365" class="LineNr"> 365 </span> <a href='081print.mu.html#L581'>screen-width</a>:num <span class="Special"><-</span> <a href='081print.mu.html#L581'>screen-width</a> <a href='081print.mu.html#L4'>screen</a> <span id="L366" class="LineNr"> 366 </span> <span class="Delimiter">{</span> <span id="L367" class="LineNr"> 367 </span> <span class="Comment"># hit right margin? give up and let caller render</span> -<span id="L368" class="LineNr"> 368 </span> at-right?:bool <span class="Special"><-</span> greater-or-equal curr-column, screen-width +<span id="L368" class="LineNr"> 368 </span> at-right?:bool <span class="Special"><-</span> greater-or-equal curr-column, <a href='081print.mu.html#L581'>screen-width</a> <span id="L369" class="LineNr"> 369 </span> <span class="muControl">return-if</span> at-right?, <span class="Constant">1/go-render</span> <span id="L370" class="LineNr"> 370 </span> <span class="muControl">break-unless</span> curr <span id="L371" class="LineNr"> 371 </span> <span class="Comment"># newline? done.</span> <span id="L372" class="LineNr"> 372 </span> currc:char <span class="Special"><-</span> get *curr, <span class="Constant">value:offset</span> <span id="L373" class="LineNr"> 373 </span> at-newline?:bool <span class="Special"><-</span> equal currc, <span class="Constant">10/newline</span> <span id="L374" class="LineNr"> 374 </span> <span class="muControl">break-if</span> at-newline? -<span id="L375" class="LineNr"> 375 </span> screen <span class="Special"><-</span> print screen, currc +<span id="L375" class="LineNr"> 375 </span> <a href='081print.mu.html#L4'>screen</a> <span class="Special"><-</span> print <a href='081print.mu.html#L4'>screen</a>, currc <span id="L376" class="LineNr"> 376 </span> curr-column <span class="Special"><-</span> add curr-column,<span class="Constant"> 1</span> -<span id="L377" class="LineNr"> 377 </span> curr <span class="Special"><-</span> next curr +<span id="L377" class="LineNr"> 377 </span> curr <span class="Special"><-</span> <a href='065duplex_list.mu.html#L29'>next</a> curr <span id="L378" class="LineNr"> 378 </span> <span class="muControl">loop</span> <span id="L379" class="LineNr"> 379 </span> <span class="Delimiter">}</span> <span id="L380" class="LineNr"> 380 </span> <span class="Comment"># we're guaranteed not to be at the right margin</span> <span id="L381" class="LineNr"> 381 </span> space:char <span class="Special"><-</span> copy <span class="Constant">32/space</span> -<span id="L382" class="LineNr"> 382 </span> screen <span class="Special"><-</span> print screen, space +<span id="L382" class="LineNr"> 382 </span> <a href='081print.mu.html#L4'>screen</a> <span class="Special"><-</span> print <a href='081print.mu.html#L4'>screen</a>, space <span id="L383" class="LineNr"> 383 </span> go-render? <span class="Special"><-</span> copy <span class="Constant">0/false</span> <span id="L384" class="LineNr"> 384 </span>] <span id="L385" class="LineNr"> 385 </span> @@ -447,14 +447,14 @@ if ('onhashchange' in window) { <span id="L389" class="LineNr"> 389 </span> <span class="Constant">local-scope</span> <span id="L390" class="LineNr"> 390 </span> assume-screen <span class="Constant">10/width</span>, <span class="Constant">5/height</span> <span id="L391" class="LineNr"> 391 </span> e:&:editor <span class="Special"><-</span> new-editor <span class="Constant">[abc]</span>, <span class="Constant">0/left</span>, <span class="Constant">10/right</span> -<span id="L392" class="LineNr"> 392 </span> editor-render screen, e +<span id="L392" class="LineNr"> 392 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L393" class="LineNr"> 393 </span> $clear-trace <span id="L394" class="LineNr"> 394 </span> assume-console [ <span id="L395" class="LineNr"> 395 </span> press right-arrow <span id="L396" class="LineNr"> 396 </span> type <span class="Constant">[0]</span> <span id="L397" class="LineNr"> 397 </span> ] <span id="L398" class="LineNr"> 398 </span> run [ -<span id="L399" class="LineNr"> 399 </span> editor-event-loop screen, console, e +<span id="L399" class="LineNr"> 399 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L400" class="LineNr"> 400 </span> ] <span id="L401" class="LineNr"> 401 </span> screen-should-contain [ <span id="L402" class="LineNr"> 402 </span> <span class="Constant"> . .</span> @@ -470,21 +470,21 @@ if ('onhashchange' in window) { <span id="L412" class="LineNr"> 412 </span> move-to-next-character?:bool <span class="Special"><-</span> equal k, <span class="Constant">65514/right-arrow</span> <span id="L413" class="LineNr"> 413 </span> <span class="muControl">break-unless</span> move-to-next-character? <span id="L414" class="LineNr"> 414 </span> <span class="Comment"># if not at end of text</span> -<span id="L415" class="LineNr"> 415 </span> next-cursor:&:duplex-list:char <span class="Special"><-</span> next before-cursor +<span id="L415" class="LineNr"> 415 </span> next-cursor:&:duplex-list:char <span class="Special"><-</span> <a href='065duplex_list.mu.html#L29'>next</a> before-cursor <span id="L416" class="LineNr"> 416 </span> <span class="muControl">break-unless</span> next-cursor <span id="L417" class="LineNr"> 417 </span> <span class="Comment"># scan to next character</span> <span id="L418" class="LineNr"> 418 </span><span class="Constant"> <move-cursor-begin></span> <span id="L419" class="LineNr"> 419 </span> before-cursor <span class="Special"><-</span> copy next-cursor <span id="L420" class="LineNr"> 420 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">before-cursor:offset</span>, before-cursor -<span id="L421" class="LineNr"> 421 </span> go-render?:bool <span class="Special"><-</span> move-cursor-coordinates-right editor, screen-height -<span id="L422" class="LineNr"> 422 </span> screen <span class="Special"><-</span> move-cursor screen, cursor-row, cursor-column +<span id="L421" class="LineNr"> 421 </span> go-render?:bool <span class="Special"><-</span> move-cursor-coordinates-right editor, <a href='081print.mu.html#L594'>screen-height</a> +<span id="L422" class="LineNr"> 422 </span> <a href='081print.mu.html#L4'>screen</a> <span class="Special"><-</span> <a href='081print.mu.html#L442'>move-cursor</a> <a href='081print.mu.html#L4'>screen</a>, cursor-row, cursor-column <span id="L423" class="LineNr"> 423 </span> undo-coalesce-tag:num <span class="Special"><-</span> copy <span class="Constant">2/right-arrow</span> <span id="L424" class="LineNr"> 424 </span><span class="Constant"> <move-cursor-end></span> <span id="L425" class="LineNr"> 425 </span> <span class="muControl">return</span> <span id="L426" class="LineNr"> 426 </span> <span class="Delimiter">}</span> <span id="L427" class="LineNr"> 427 </span>] <span id="L428" class="LineNr"> 428 </span> -<span id="L429" class="LineNr"> 429 </span><span class="muRecipe">def</span> move-cursor-coordinates-right editor:&:editor, screen-height:num<span class="muRecipe"> -> </span>go-render?:bool, editor:&:editor [ +<span id="L429" class="LineNr"> 429 </span><span class="muRecipe">def</span> move-cursor-coordinates-right editor:&:editor, <a href='081print.mu.html#L594'>screen-height</a>:num<span class="muRecipe"> -> </span>go-render?:bool, editor:&:editor [ <span id="L430" class="LineNr"> 430 </span> <span class="Constant">local-scope</span> <span id="L431" class="LineNr"> 431 </span> <span class="Constant">load-ingredients</span> <span id="L432" class="LineNr"> 432 </span> before-cursor:&:duplex-list:char <span class="Special"><-</span> get *editor <span class="Constant">before-cursor:offset</span> @@ -501,7 +501,7 @@ if ('onhashchange' in window) { <span id="L443" class="LineNr"> 443 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-row:offset</span>, cursor-row <span id="L444" class="LineNr"> 444 </span> cursor-column <span class="Special"><-</span> copy left <span id="L445" class="LineNr"> 445 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-column:offset</span>, cursor-column -<span id="L446" class="LineNr"> 446 </span> below-screen?:bool <span class="Special"><-</span> greater-or-equal cursor-row, screen-height <span class="Comment"># must be equal</span> +<span id="L446" class="LineNr"> 446 </span> below-screen?:bool <span class="Special"><-</span> greater-or-equal cursor-row, <a href='081print.mu.html#L594'>screen-height</a> <span class="Comment"># must be equal</span> <span id="L447" class="LineNr"> 447 </span> <span class="muControl">return-unless</span> below-screen?, <span class="Constant">0/don't-render</span> <span id="L448" class="LineNr"> 448 </span><span class="Constant"> <scroll-down></span> <span id="L449" class="LineNr"> 449 </span> cursor-row <span class="Special"><-</span> subtract cursor-row,<span class="Constant"> 1</span> <span class="Comment"># bring back into screen range</span> @@ -515,8 +515,8 @@ if ('onhashchange' in window) { <span id="L457" class="LineNr"> 457 </span> at-wrap?:bool <span class="Special"><-</span> equal cursor-column, wrap-column <span id="L458" class="LineNr"> 458 </span> <span class="muControl">break-unless</span> at-wrap? <span id="L459" class="LineNr"> 459 </span> <span class="Comment"># and if next character isn't newline</span> -<span id="L460" class="LineNr"> 460 </span> next:&:duplex-list:char <span class="Special"><-</span> next before-cursor -<span id="L461" class="LineNr"> 461 </span> <span class="muControl">break-unless</span> next +<span id="L460" class="LineNr"> 460 </span> <a href='065duplex_list.mu.html#L29'>next</a>:&:duplex-list:char <span class="Special"><-</span> <a href='065duplex_list.mu.html#L29'>next</a> before-cursor +<span id="L461" class="LineNr"> 461 </span> <span class="muControl">break-unless</span> <a href='065duplex_list.mu.html#L29'>next</a> <span id="L462" class="LineNr"> 462 </span> next-character:char <span class="Special"><-</span> get *next, <span class="Constant">value:offset</span> <span id="L463" class="LineNr"> 463 </span> newline?:bool <span class="Special"><-</span> equal next-character, <span class="Constant">10/newline</span> <span id="L464" class="LineNr"> 464 </span> <span class="muControl">break-if</span> newline? @@ -524,7 +524,7 @@ if ('onhashchange' in window) { <span id="L466" class="LineNr"> 466 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-row:offset</span>, cursor-row <span id="L467" class="LineNr"> 467 </span> cursor-column <span class="Special"><-</span> copy left <span id="L468" class="LineNr"> 468 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-column:offset</span>, cursor-column -<span id="L469" class="LineNr"> 469 </span> below-screen?:bool <span class="Special"><-</span> greater-or-equal cursor-row, screen-height <span class="Comment"># must be equal</span> +<span id="L469" class="LineNr"> 469 </span> below-screen?:bool <span class="Special"><-</span> greater-or-equal cursor-row, <a href='081print.mu.html#L594'>screen-height</a> <span class="Comment"># must be equal</span> <span id="L470" class="LineNr"> 470 </span> <span class="muControl">return-unless</span> below-screen?, <span class="Constant">0/no-more-render</span> <span id="L471" class="LineNr"> 471 </span><span class="Constant"> <scroll-down></span> <span id="L472" class="LineNr"> 472 </span> cursor-row <span class="Special"><-</span> subtract cursor-row,<span class="Constant"> 1</span> <span class="Comment"># bring back into screen range</span> @@ -543,7 +543,7 @@ if ('onhashchange' in window) { <span id="L485" class="LineNr"> 485 </span> s:text <span class="Special"><-</span> new <span class="Constant">[abc</span> <span id="L486" class="LineNr"> 486 </span><span class="Constant">d]</span> <span id="L487" class="LineNr"> 487 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">10/right</span> -<span id="L488" class="LineNr"> 488 </span> editor-render screen, e +<span id="L488" class="LineNr"> 488 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L489" class="LineNr"> 489 </span> $clear-trace <span id="L490" class="LineNr"> 490 </span> <span class="Comment"># type right-arrow a few times to get to start of second line</span> <span id="L491" class="LineNr"> 491 </span> assume-console [ @@ -553,7 +553,7 @@ if ('onhashchange' in window) { <span id="L495" class="LineNr"> 495 </span> press right-arrow <span class="Comment"># next line</span> <span id="L496" class="LineNr"> 496 </span> ] <span id="L497" class="LineNr"> 497 </span> run [ -<span id="L498" class="LineNr"> 498 </span> editor-event-loop screen, console, e +<span id="L498" class="LineNr"> 498 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L499" class="LineNr"> 499 </span> ] <span id="L500" class="LineNr"> 500 </span> check-trace-count-for-label<span class="Constant"> 0</span>, <span class="Constant">[print-character]</span> <span id="L501" class="LineNr"> 501 </span> <span class="Comment"># type something and ensure it goes where it should</span> @@ -561,7 +561,7 @@ if ('onhashchange' in window) { <span id="L503" class="LineNr"> 503 </span> type <span class="Constant">[0]</span> <span id="L504" class="LineNr"> 504 </span> ] <span id="L505" class="LineNr"> 505 </span> run [ -<span id="L506" class="LineNr"> 506 </span> editor-event-loop screen, console, e +<span id="L506" class="LineNr"> 506 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L507" class="LineNr"> 507 </span> ] <span id="L508" class="LineNr"> 508 </span> screen-should-contain [ <span id="L509" class="LineNr"> 509 </span> <span class="Constant"> . .</span> @@ -579,7 +579,7 @@ if ('onhashchange' in window) { <span id="L521" class="LineNr"> 521 </span> s:text <span class="Special"><-</span> new <span class="Constant">[abc</span> <span id="L522" class="LineNr"> 522 </span><span class="Constant">d]</span> <span id="L523" class="LineNr"> 523 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">1/left</span>, <span class="Constant">10/right</span> -<span id="L524" class="LineNr"> 524 </span> editor-render screen, e +<span id="L524" class="LineNr"> 524 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L525" class="LineNr"> 525 </span> assume-console [ <span id="L526" class="LineNr"> 526 </span> press right-arrow <span id="L527" class="LineNr"> 527 </span> press right-arrow @@ -588,7 +588,7 @@ if ('onhashchange' in window) { <span id="L530" class="LineNr"> 530 </span> type <span class="Constant">[0]</span> <span id="L531" class="LineNr"> 531 </span> ] <span id="L532" class="LineNr"> 532 </span> run [ -<span id="L533" class="LineNr"> 533 </span> editor-event-loop screen, console, e +<span id="L533" class="LineNr"> 533 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L534" class="LineNr"> 534 </span> ] <span id="L535" class="LineNr"> 535 </span> screen-should-contain [ <span id="L536" class="LineNr"> 536 </span> <span class="Constant"> . .</span> @@ -603,14 +603,14 @@ if ('onhashchange' in window) { <span id="L545" class="LineNr"> 545 </span> <span class="Constant">local-scope</span> <span id="L546" class="LineNr"> 546 </span> assume-screen <span class="Constant">10/width</span>, <span class="Constant">5/height</span> <span id="L547" class="LineNr"> 547 </span> e:&:editor <span class="Special"><-</span> new-editor <span class="Constant">[abcdef]</span>, <span class="Constant">0/left</span>, <span class="Constant">5/right</span> -<span id="L548" class="LineNr"> 548 </span> editor-render screen, e +<span id="L548" class="LineNr"> 548 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L549" class="LineNr"> 549 </span> $clear-trace <span id="L550" class="LineNr"> 550 </span> assume-console [ <span id="L551" class="LineNr"> 551 </span> left-click<span class="Constant"> 1</span>,<span class="Constant"> 3</span> <span id="L552" class="LineNr"> 552 </span> press right-arrow <span id="L553" class="LineNr"> 553 </span> ] <span id="L554" class="LineNr"> 554 </span> run [ -<span id="L555" class="LineNr"> 555 </span> editor-event-loop screen, console, e +<span id="L555" class="LineNr"> 555 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L556" class="LineNr"> 556 </span> 3:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-row:offset</span> <span id="L557" class="LineNr"> 557 </span> 4:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-column:offset</span> <span id="L558" class="LineNr"> 558 </span> ] @@ -633,7 +633,7 @@ if ('onhashchange' in window) { <span id="L575" class="LineNr"> 575 </span> assume-screen <span class="Constant">10/width</span>, <span class="Constant">5/height</span> <span id="L576" class="LineNr"> 576 </span> <span class="Comment"># line just barely wrapping</span> <span id="L577" class="LineNr"> 577 </span> e:&:editor <span class="Special"><-</span> new-editor <span class="Constant">[abcde]</span>, <span class="Constant">0/left</span>, <span class="Constant">5/right</span> -<span id="L578" class="LineNr"> 578 </span> editor-render screen, e +<span id="L578" class="LineNr"> 578 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L579" class="LineNr"> 579 </span> $clear-trace <span id="L580" class="LineNr"> 580 </span> <span class="Comment"># position cursor at last character before wrap and hit right-arrow</span> <span id="L581" class="LineNr"> 581 </span> assume-console [ @@ -641,7 +641,7 @@ if ('onhashchange' in window) { <span id="L583" class="LineNr"> 583 </span> press right-arrow <span id="L584" class="LineNr"> 584 </span> ] <span id="L585" class="LineNr"> 585 </span> run [ -<span id="L586" class="LineNr"> 586 </span> editor-event-loop screen, console, e +<span id="L586" class="LineNr"> 586 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L587" class="LineNr"> 587 </span> 3:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-row:offset</span> <span id="L588" class="LineNr"> 588 </span> 4:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-column:offset</span> <span id="L589" class="LineNr"> 589 </span> ] @@ -654,7 +654,7 @@ if ('onhashchange' in window) { <span id="L596" class="LineNr"> 596 </span> press right-arrow <span id="L597" class="LineNr"> 597 </span> ] <span id="L598" class="LineNr"> 598 </span> run [ -<span id="L599" class="LineNr"> 599 </span> editor-event-loop screen, console, e +<span id="L599" class="LineNr"> 599 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L600" class="LineNr"> 600 </span> 3:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-row:offset</span> <span id="L601" class="LineNr"> 601 </span> 4:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-column:offset</span> <span id="L602" class="LineNr"> 602 </span> ] @@ -669,14 +669,14 @@ if ('onhashchange' in window) { <span id="L611" class="LineNr"> 611 </span> <span class="Constant">local-scope</span> <span id="L612" class="LineNr"> 612 </span> assume-screen <span class="Constant">10/width</span>, <span class="Constant">5/height</span> <span id="L613" class="LineNr"> 613 </span> e:&:editor <span class="Special"><-</span> new-editor <span class="Constant">[abcdef]</span>, <span class="Constant">1/left</span>, <span class="Constant">6/right</span> -<span id="L614" class="LineNr"> 614 </span> editor-render screen, e +<span id="L614" class="LineNr"> 614 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L615" class="LineNr"> 615 </span> $clear-trace <span id="L616" class="LineNr"> 616 </span> assume-console [ <span id="L617" class="LineNr"> 617 </span> left-click<span class="Constant"> 1</span>,<span class="Constant"> 4</span> <span id="L618" class="LineNr"> 618 </span> press right-arrow <span id="L619" class="LineNr"> 619 </span> ] <span id="L620" class="LineNr"> 620 </span> run [ -<span id="L621" class="LineNr"> 621 </span> editor-event-loop screen, console, e +<span id="L621" class="LineNr"> 621 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L622" class="LineNr"> 622 </span> 3:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-row:offset</span> <span id="L623" class="LineNr"> 623 </span> 4:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-column:offset</span> <span id="L624" class="LineNr"> 624 </span> ] @@ -700,7 +700,7 @@ if ('onhashchange' in window) { <span id="L642" class="LineNr"> 642 </span> s:text <span class="Special"><-</span> new <span class="Constant">[abc</span> <span id="L643" class="LineNr"> 643 </span><span class="Constant">d]</span> <span id="L644" class="LineNr"> 644 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">10/right</span> -<span id="L645" class="LineNr"> 645 </span> editor-render screen, e +<span id="L645" class="LineNr"> 645 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L646" class="LineNr"> 646 </span> $clear-trace <span id="L647" class="LineNr"> 647 </span> <span class="Comment"># move to end of line, press right-arrow, type a character</span> <span id="L648" class="LineNr"> 648 </span> assume-console [ @@ -709,7 +709,7 @@ if ('onhashchange' in window) { <span id="L651" class="LineNr"> 651 </span> type <span class="Constant">[0]</span> <span id="L652" class="LineNr"> 652 </span> ] <span id="L653" class="LineNr"> 653 </span> run [ -<span id="L654" class="LineNr"> 654 </span> editor-event-loop screen, console, e +<span id="L654" class="LineNr"> 654 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L655" class="LineNr"> 655 </span> ] <span id="L656" class="LineNr"> 656 </span> <span class="Comment"># new character should be in next line</span> <span id="L657" class="LineNr"> 657 </span> screen-should-contain [ @@ -730,7 +730,7 @@ if ('onhashchange' in window) { <span id="L672" class="LineNr"> 672 </span> <span class="Constant">local-scope</span> <span id="L673" class="LineNr"> 673 </span> assume-screen <span class="Constant">10/width</span>, <span class="Constant">5/height</span> <span id="L674" class="LineNr"> 674 </span> e:&:editor <span class="Special"><-</span> new-editor <span class="Constant">[abc]</span>, <span class="Constant">0/left</span>, <span class="Constant">10/right</span> -<span id="L675" class="LineNr"> 675 </span> editor-render screen, e +<span id="L675" class="LineNr"> 675 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L676" class="LineNr"> 676 </span> $clear-trace <span id="L677" class="LineNr"> 677 </span> assume-console [ <span id="L678" class="LineNr"> 678 </span> left-click<span class="Constant"> 1</span>,<span class="Constant"> 2</span> @@ -738,7 +738,7 @@ if ('onhashchange' in window) { <span id="L680" class="LineNr"> 680 </span> type <span class="Constant">[0]</span> <span id="L681" class="LineNr"> 681 </span> ] <span id="L682" class="LineNr"> 682 </span> run [ -<span id="L683" class="LineNr"> 683 </span> editor-event-loop screen, console, e +<span id="L683" class="LineNr"> 683 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L684" class="LineNr"> 684 </span> ] <span id="L685" class="LineNr"> 685 </span> screen-should-contain [ <span id="L686" class="LineNr"> 686 </span> <span class="Constant"> . .</span> @@ -755,11 +755,11 @@ if ('onhashchange' in window) { <span id="L697" class="LineNr"> 697 </span> <span class="muControl">break-unless</span> move-to-previous-character? <span id="L698" class="LineNr"> 698 </span> trace<span class="Constant"> 10</span>, <span class="Constant">[app]</span>, <span class="Constant">[left arrow]</span> <span id="L699" class="LineNr"> 699 </span> <span class="Comment"># if not at start of text (before-cursor at § sentinel)</span> -<span id="L700" class="LineNr"> 700 </span> prev:&:duplex-list:char <span class="Special"><-</span> prev before-cursor -<span id="L701" class="LineNr"> 701 </span> <span class="muControl">return-unless</span> prev, <span class="Constant">0/don't-render</span> +<span id="L700" class="LineNr"> 700 </span> <a href='065duplex_list.mu.html#L36'>prev</a>:&:duplex-list:char <span class="Special"><-</span> <a href='065duplex_list.mu.html#L36'>prev</a> before-cursor +<span id="L701" class="LineNr"> 701 </span> <span class="muControl">return-unless</span> <a href='065duplex_list.mu.html#L36'>prev</a>, <span class="Constant">0/don't-render</span> <span id="L702" class="LineNr"> 702 </span><span class="Constant"> <move-cursor-begin></span> <span id="L703" class="LineNr"> 703 </span> go-render? <span class="Special"><-</span> move-cursor-coordinates-left editor -<span id="L704" class="LineNr"> 704 </span> before-cursor <span class="Special"><-</span> copy prev +<span id="L704" class="LineNr"> 704 </span> before-cursor <span class="Special"><-</span> copy <a href='065duplex_list.mu.html#L36'>prev</a> <span id="L705" class="LineNr"> 705 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">before-cursor:offset</span>, before-cursor <span id="L706" class="LineNr"> 706 </span> undo-coalesce-tag:num <span class="Special"><-</span> copy <span class="Constant">1/left-arrow</span> <span id="L707" class="LineNr"> 707 </span><span class="Constant"> <move-cursor-end></span> @@ -774,7 +774,7 @@ if ('onhashchange' in window) { <span id="L716" class="LineNr"> 716 </span> s:text <span class="Special"><-</span> new <span class="Constant">[abc</span> <span id="L717" class="LineNr"> 717 </span><span class="Constant">d]</span> <span id="L718" class="LineNr"> 718 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">10/right</span> -<span id="L719" class="LineNr"> 719 </span> editor-render screen, e +<span id="L719" class="LineNr"> 719 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L720" class="LineNr"> 720 </span> $clear-trace <span id="L721" class="LineNr"> 721 </span> <span class="Comment"># position cursor at start of second line (so there's no previous newline)</span> <span id="L722" class="LineNr"> 722 </span> assume-console [ @@ -782,7 +782,7 @@ if ('onhashchange' in window) { <span id="L724" class="LineNr"> 724 </span> press left-arrow <span id="L725" class="LineNr"> 725 </span> ] <span id="L726" class="LineNr"> 726 </span> run [ -<span id="L727" class="LineNr"> 727 </span> editor-event-loop screen, console, e +<span id="L727" class="LineNr"> 727 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L728" class="LineNr"> 728 </span> 3:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-row:offset</span> <span id="L729" class="LineNr"> 729 </span> 4:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-column:offset</span> <span id="L730" class="LineNr"> 730 </span> ] @@ -801,7 +801,7 @@ if ('onhashchange' in window) { <span id="L743" class="LineNr"> 743 </span><span class="Constant">def</span> <span id="L744" class="LineNr"> 744 </span><span class="Constant">g]</span> <span id="L745" class="LineNr"> 745 </span> e:&:editor <span class="Special"><-</span> new-editor s:text, <span class="Constant">0/left</span>, <span class="Constant">10/right</span> -<span id="L746" class="LineNr"> 746 </span> editor-render screen, e +<span id="L746" class="LineNr"> 746 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L747" class="LineNr"> 747 </span> $clear-trace <span id="L748" class="LineNr"> 748 </span> <span class="Comment"># position cursor further down (so there's a newline before the character at</span> <span id="L749" class="LineNr"> 749 </span> <span class="Comment"># the cursor)</span> @@ -811,7 +811,7 @@ if ('onhashchange' in window) { <span id="L753" class="LineNr"> 753 </span> type <span class="Constant">[0]</span> <span id="L754" class="LineNr"> 754 </span> ] <span id="L755" class="LineNr"> 755 </span> run [ -<span id="L756" class="LineNr"> 756 </span> editor-event-loop screen, console, e +<span id="L756" class="LineNr"> 756 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L757" class="LineNr"> 757 </span> ] <span id="L758" class="LineNr"> 758 </span> screen-should-contain [ <span id="L759" class="LineNr"> 759 </span> <span class="Constant"> . .</span> @@ -830,7 +830,7 @@ if ('onhashchange' in window) { <span id="L772" class="LineNr"> 772 </span><span class="Constant">def</span> <span id="L773" class="LineNr"> 773 </span><span class="Constant">g]</span> <span id="L774" class="LineNr"> 774 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">10/right</span> -<span id="L775" class="LineNr"> 775 </span> editor-render screen, e +<span id="L775" class="LineNr"> 775 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L776" class="LineNr"> 776 </span> $clear-trace <span id="L777" class="LineNr"> 777 </span> <span class="Comment"># position cursor at start of text, press left-arrow, then type a character</span> <span id="L778" class="LineNr"> 778 </span> assume-console [ @@ -839,7 +839,7 @@ if ('onhashchange' in window) { <span id="L781" class="LineNr"> 781 </span> type <span class="Constant">[0]</span> <span id="L782" class="LineNr"> 782 </span> ] <span id="L783" class="LineNr"> 783 </span> run [ -<span id="L784" class="LineNr"> 784 </span> editor-event-loop screen, console, e +<span id="L784" class="LineNr"> 784 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L785" class="LineNr"> 785 </span> ] <span id="L786" class="LineNr"> 786 </span> <span class="Comment"># left-arrow should have had no effect</span> <span id="L787" class="LineNr"> 787 </span> screen-should-contain [ @@ -860,7 +860,7 @@ if ('onhashchange' in window) { <span id="L802" class="LineNr"> 802 </span> <span id="L803" class="LineNr"> 803 </span>d] <span id="L804" class="LineNr"> 804 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">10/right</span> -<span id="L805" class="LineNr"> 805 </span> editor-render screen, e:&:editor +<span id="L805" class="LineNr"> 805 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e:&:editor <span id="L806" class="LineNr"> 806 </span> $clear-trace <span id="L807" class="LineNr"> 807 </span> <span class="Comment"># position cursor right after empty line</span> <span id="L808" class="LineNr"> 808 </span> assume-console [ @@ -869,7 +869,7 @@ if ('onhashchange' in window) { <span id="L811" class="LineNr"> 811 </span> type <span class="Constant">[0]</span> <span id="L812" class="LineNr"> 812 </span> ] <span id="L813" class="LineNr"> 813 </span> run [ -<span id="L814" class="LineNr"> 814 </span> editor-event-loop screen, console, e +<span id="L814" class="LineNr"> 814 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L815" class="LineNr"> 815 </span> ] <span id="L816" class="LineNr"> 816 </span> screen-should-contain [ <span id="L817" class="LineNr"> 817 </span> <span class="Constant"> . .</span> @@ -886,7 +886,7 @@ if ('onhashchange' in window) { <span id="L828" class="LineNr"> 828 </span> assume-screen <span class="Constant">10/width</span>, <span class="Constant">5/height</span> <span id="L829" class="LineNr"> 829 </span> <span class="Comment"># initialize editor with a wrapping line</span> <span id="L830" class="LineNr"> 830 </span> e:&:editor <span class="Special"><-</span> new-editor <span class="Constant">[abcdef]</span>, <span class="Constant">0/left</span>, <span class="Constant">5/right</span> -<span id="L831" class="LineNr"> 831 </span> editor-render screen, e +<span id="L831" class="LineNr"> 831 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L832" class="LineNr"> 832 </span> $clear-trace <span id="L833" class="LineNr"> 833 </span> screen-should-contain [ <span id="L834" class="LineNr"> 834 </span> <span class="Constant"> . .</span> @@ -901,7 +901,7 @@ if ('onhashchange' in window) { <span id="L843" class="LineNr"> 843 </span> press left-arrow <span id="L844" class="LineNr"> 844 </span> ] <span id="L845" class="LineNr"> 845 </span> run [ -<span id="L846" class="LineNr"> 846 </span> editor-event-loop screen, console, e +<span id="L846" class="LineNr"> 846 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L847" class="LineNr"> 847 </span> 3:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-row:offset</span> <span id="L848" class="LineNr"> 848 </span> 4:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-column:offset</span> <span id="L849" class="LineNr"> 849 </span> ] @@ -919,7 +919,7 @@ if ('onhashchange' in window) { <span id="L861" class="LineNr"> 861 </span> s:text <span class="Special"><-</span> new <span class="Constant">[abcdef</span> <span id="L862" class="LineNr"> 862 </span><span class="Constant">g]</span> <span id="L863" class="LineNr"> 863 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">5/right</span> -<span id="L864" class="LineNr"> 864 </span> editor-render screen, e +<span id="L864" class="LineNr"> 864 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L865" class="LineNr"> 865 </span> $clear-trace <span id="L866" class="LineNr"> 866 </span> screen-should-contain [ <span id="L867" class="LineNr"> 867 </span> <span class="Constant"> . .</span> @@ -934,7 +934,7 @@ if ('onhashchange' in window) { <span id="L876" class="LineNr"> 876 </span> press left-arrow <span id="L877" class="LineNr"> 877 </span> ] <span id="L878" class="LineNr"> 878 </span> run [ -<span id="L879" class="LineNr"> 879 </span> editor-event-loop screen, console, e +<span id="L879" class="LineNr"> 879 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L880" class="LineNr"> 880 </span> 3:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-row:offset</span> <span id="L881" class="LineNr"> 881 </span> 4:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-column:offset</span> <span id="L882" class="LineNr"> 882 </span> ] @@ -952,7 +952,7 @@ if ('onhashchange' in window) { <span id="L894" class="LineNr"> 894 </span> s:text <span class="Special"><-</span> new <span class="Constant">[abcd</span> <span id="L895" class="LineNr"> 895 </span><span class="Constant">e]</span> <span id="L896" class="LineNr"> 896 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">5/right</span> -<span id="L897" class="LineNr"> 897 </span> editor-render screen, e +<span id="L897" class="LineNr"> 897 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L898" class="LineNr"> 898 </span> $clear-trace <span id="L899" class="LineNr"> 899 </span> screen-should-contain [ <span id="L900" class="LineNr"> 900 </span> <span class="Constant"> . .</span> @@ -967,7 +967,7 @@ if ('onhashchange' in window) { <span id="L909" class="LineNr"> 909 </span> press left-arrow <span id="L910" class="LineNr"> 910 </span> ] <span id="L911" class="LineNr"> 911 </span> run [ -<span id="L912" class="LineNr"> 912 </span> editor-event-loop screen, console, e +<span id="L912" class="LineNr"> 912 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L913" class="LineNr"> 913 </span> 3:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-row:offset</span> <span id="L914" class="LineNr"> 914 </span> 4:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-column:offset</span> <span id="L915" class="LineNr"> 915 </span> ] @@ -988,14 +988,14 @@ if ('onhashchange' in window) { <span id="L930" class="LineNr"> 930 </span> s:text <span class="Special"><-</span> new <span class="Constant">[abc</span> <span id="L931" class="LineNr"> 931 </span><span class="Constant">def]</span> <span id="L932" class="LineNr"> 932 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">10/right</span> -<span id="L933" class="LineNr"> 933 </span> editor-render screen, e +<span id="L933" class="LineNr"> 933 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L934" class="LineNr"> 934 </span> $clear-trace <span id="L935" class="LineNr"> 935 </span> assume-console [ <span id="L936" class="LineNr"> 936 </span> left-click<span class="Constant"> 2</span>,<span class="Constant"> 1</span> <span id="L937" class="LineNr"> 937 </span> press up-arrow <span id="L938" class="LineNr"> 938 </span> ] <span id="L939" class="LineNr"> 939 </span> run [ -<span id="L940" class="LineNr"> 940 </span> editor-event-loop screen, console, e +<span id="L940" class="LineNr"> 940 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L941" class="LineNr"> 941 </span> 3:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-row:offset</span> <span id="L942" class="LineNr"> 942 </span> 4:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-column:offset</span> <span id="L943" class="LineNr"> 943 </span> ] @@ -1008,7 +1008,7 @@ if ('onhashchange' in window) { <span id="L950" class="LineNr"> 950 </span> type <span class="Constant">[0]</span> <span id="L951" class="LineNr"> 951 </span> ] <span id="L952" class="LineNr"> 952 </span> run [ -<span id="L953" class="LineNr"> 953 </span> editor-event-loop screen, console, e +<span id="L953" class="LineNr"> 953 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L954" class="LineNr"> 954 </span> ] <span id="L955" class="LineNr"> 955 </span> screen-should-contain [ <span id="L956" class="LineNr"> 956 </span> <span class="Constant"> . .</span> @@ -1074,7 +1074,7 @@ if ('onhashchange' in window) { <span id="L1016" class="LineNr">1016 </span> <span class="Delimiter">{</span> <span id="L1017" class="LineNr">1017 </span> done?:bool <span class="Special"><-</span> greater-or-equal cursor-column, target-column <span id="L1018" class="LineNr">1018 </span> <span class="muControl">break-if</span> done? -<span id="L1019" class="LineNr">1019 </span> curr:&:duplex-list:char <span class="Special"><-</span> next before-cursor +<span id="L1019" class="LineNr">1019 </span> curr:&:duplex-list:char <span class="Special"><-</span> <a href='065duplex_list.mu.html#L29'>next</a> before-cursor <span id="L1020" class="LineNr">1020 </span> <span class="muControl">break-unless</span> curr <span id="L1021" class="LineNr">1021 </span> currc:char <span class="Special"><-</span> get *curr, <span class="Constant">value:offset</span> <span id="L1022" class="LineNr">1022 </span> at-newline?:bool <span class="Special"><-</span> equal currc, <span class="Constant">10/newline</span> @@ -1102,14 +1102,14 @@ if ('onhashchange' in window) { <span id="L1044" class="LineNr">1044 </span> s:text <span class="Special"><-</span> new <span class="Constant">[ab</span> <span id="L1045" class="LineNr">1045 </span><span class="Constant">def]</span> <span id="L1046" class="LineNr">1046 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">10/right</span> -<span id="L1047" class="LineNr">1047 </span> editor-render screen, e +<span id="L1047" class="LineNr">1047 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L1048" class="LineNr">1048 </span> $clear-trace <span id="L1049" class="LineNr">1049 </span> assume-console [ <span id="L1050" class="LineNr">1050 </span> left-click<span class="Constant"> 2</span>,<span class="Constant"> 3</span> <span id="L1051" class="LineNr">1051 </span> press up-arrow <span id="L1052" class="LineNr">1052 </span> ] <span id="L1053" class="LineNr">1053 </span> run [ -<span id="L1054" class="LineNr">1054 </span> editor-event-loop screen, console, e +<span id="L1054" class="LineNr">1054 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L1055" class="LineNr">1055 </span> 3:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-row:offset</span> <span id="L1056" class="LineNr">1056 </span> 4:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-column:offset</span> <span id="L1057" class="LineNr">1057 </span> ] @@ -1122,7 +1122,7 @@ if ('onhashchange' in window) { <span id="L1064" class="LineNr">1064 </span> type <span class="Constant">[0]</span> <span id="L1065" class="LineNr">1065 </span> ] <span id="L1066" class="LineNr">1066 </span> run [ -<span id="L1067" class="LineNr">1067 </span> editor-event-loop screen, console, e +<span id="L1067" class="LineNr">1067 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L1068" class="LineNr">1068 </span> ] <span id="L1069" class="LineNr">1069 </span> screen-should-contain [ <span id="L1070" class="LineNr">1070 </span> <span class="Constant"> . .</span> @@ -1139,14 +1139,14 @@ if ('onhashchange' in window) { <span id="L1081" class="LineNr">1081 </span> s:text <span class="Special"><-</span> new [ <span id="L1082" class="LineNr">1082 </span><span class="muRecipe">def</span>] <span id="L1083" class="LineNr">1083 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">10/right</span> -<span id="L1084" class="LineNr">1084 </span> editor-render screen, e +<span id="L1084" class="LineNr">1084 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L1085" class="LineNr">1085 </span> $clear-trace <span id="L1086" class="LineNr">1086 </span> assume-console [ <span id="L1087" class="LineNr">1087 </span> left-click<span class="Constant"> 2</span>,<span class="Constant"> 3</span> <span id="L1088" class="LineNr">1088 </span> press up-arrow <span id="L1089" class="LineNr">1089 </span> ] <span id="L1090" class="LineNr">1090 </span> run [ -<span id="L1091" class="LineNr">1091 </span> editor-event-loop screen, console, e +<span id="L1091" class="LineNr">1091 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L1092" class="LineNr">1092 </span> 3:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-row:offset</span> <span id="L1093" class="LineNr">1093 </span> 4:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-column:offset</span> <span id="L1094" class="LineNr">1094 </span> ] @@ -1159,7 +1159,7 @@ if ('onhashchange' in window) { <span id="L1101" class="LineNr">1101 </span> type <span class="Constant">[0]</span> <span id="L1102" class="LineNr">1102 </span> ] <span id="L1103" class="LineNr">1103 </span> run [ -<span id="L1104" class="LineNr">1104 </span> editor-event-loop screen, console, e +<span id="L1104" class="LineNr">1104 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L1105" class="LineNr">1105 </span> ] <span id="L1106" class="LineNr">1106 </span> screen-should-contain [ <span id="L1107" class="LineNr">1107 </span> <span class="Constant"> . .</span> @@ -1178,7 +1178,7 @@ if ('onhashchange' in window) { <span id="L1120" class="LineNr">1120 </span><span class="Constant">def</span> <span id="L1121" class="LineNr">1121 </span><span class="Constant">ghi]</span> <span id="L1122" class="LineNr">1122 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">10/right</span> -<span id="L1123" class="LineNr">1123 </span> editor-render screen, e +<span id="L1123" class="LineNr">1123 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L1124" class="LineNr">1124 </span> $clear-trace <span id="L1125" class="LineNr">1125 </span> <span class="Comment"># click on the third line and hit up-arrow, so you end up just after a newline</span> <span id="L1126" class="LineNr">1126 </span> assume-console [ @@ -1186,7 +1186,7 @@ if ('onhashchange' in window) { <span id="L1128" class="LineNr">1128 </span> press up-arrow <span id="L1129" class="LineNr">1129 </span> ] <span id="L1130" class="LineNr">1130 </span> run [ -<span id="L1131" class="LineNr">1131 </span> editor-event-loop screen, console, e +<span id="L1131" class="LineNr">1131 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L1132" class="LineNr">1132 </span> 3:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-row:offset</span> <span id="L1133" class="LineNr">1133 </span> 4:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-column:offset</span> <span id="L1134" class="LineNr">1134 </span> ] @@ -1199,7 +1199,7 @@ if ('onhashchange' in window) { <span id="L1141" class="LineNr">1141 </span> type <span class="Constant">[0]</span> <span id="L1142" class="LineNr">1142 </span> ] <span id="L1143" class="LineNr">1143 </span> run [ -<span id="L1144" class="LineNr">1144 </span> editor-event-loop screen, console, e +<span id="L1144" class="LineNr">1144 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L1145" class="LineNr">1145 </span> ] <span id="L1146" class="LineNr">1146 </span> screen-should-contain [ <span id="L1147" class="LineNr">1147 </span> <span class="Constant"> . .</span> @@ -1218,14 +1218,14 @@ if ('onhashchange' in window) { <span id="L1160" class="LineNr">1160 </span> s:text <span class="Special"><-</span> new <span class="Constant">[abc</span> <span id="L1161" class="LineNr">1161 </span><span class="Constant">def]</span> <span id="L1162" class="LineNr">1162 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">10/right</span> -<span id="L1163" class="LineNr">1163 </span> editor-render screen, e +<span id="L1163" class="LineNr">1163 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L1164" class="LineNr">1164 </span> $clear-trace <span id="L1165" class="LineNr">1165 </span> <span class="Comment"># cursor starts out at (1, 0)</span> <span id="L1166" class="LineNr">1166 </span> assume-console [ <span id="L1167" class="LineNr">1167 </span> press down-arrow <span id="L1168" class="LineNr">1168 </span> ] <span id="L1169" class="LineNr">1169 </span> run [ -<span id="L1170" class="LineNr">1170 </span> editor-event-loop screen, console, e +<span id="L1170" class="LineNr">1170 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L1171" class="LineNr">1171 </span> 3:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-row:offset</span> <span id="L1172" class="LineNr">1172 </span> 4:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-column:offset</span> <span id="L1173" class="LineNr">1173 </span> ] @@ -1239,7 +1239,7 @@ if ('onhashchange' in window) { <span id="L1181" class="LineNr">1181 </span> type <span class="Constant">[0]</span> <span id="L1182" class="LineNr">1182 </span> ] <span id="L1183" class="LineNr">1183 </span> run [ -<span id="L1184" class="LineNr">1184 </span> editor-event-loop screen, console, e +<span id="L1184" class="LineNr">1184 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L1185" class="LineNr">1185 </span> ] <span id="L1186" class="LineNr">1186 </span> screen-should-contain [ <span id="L1187" class="LineNr">1187 </span> <span class="Constant"> . .</span> @@ -1255,14 +1255,14 @@ if ('onhashchange' in window) { <span id="L1197" class="LineNr">1197 </span> move-to-next-line?:bool <span class="Special"><-</span> equal k, <span class="Constant">65516/down-arrow</span> <span id="L1198" class="LineNr">1198 </span> <span class="muControl">break-unless</span> move-to-next-line? <span id="L1199" class="LineNr">1199 </span><span class="Constant"> <move-cursor-begin></span> -<span id="L1200" class="LineNr">1200 </span> go-render? <span class="Special"><-</span> move-to-next-line editor, screen-height +<span id="L1200" class="LineNr">1200 </span> go-render? <span class="Special"><-</span> move-to-next-line editor, <a href='081print.mu.html#L594'>screen-height</a> <span id="L1201" class="LineNr">1201 </span> undo-coalesce-tag:num <span class="Special"><-</span> copy <span class="Constant">4/down-arrow</span> <span id="L1202" class="LineNr">1202 </span><span class="Constant"> <move-cursor-end></span> <span id="L1203" class="LineNr">1203 </span> <span class="muControl">return</span> <span id="L1204" class="LineNr">1204 </span> <span class="Delimiter">}</span> <span id="L1205" class="LineNr">1205 </span>] <span id="L1206" class="LineNr">1206 </span> -<span id="L1207" class="LineNr">1207 </span><span class="muRecipe">def</span> move-to-next-line editor:&:editor, screen-height:num<span class="muRecipe"> -> </span>go-render?:bool, editor:&:editor [ +<span id="L1207" class="LineNr">1207 </span><span class="muRecipe">def</span> move-to-next-line editor:&:editor, <a href='081print.mu.html#L594'>screen-height</a>:num<span class="muRecipe"> -> </span>go-render?:bool, editor:&:editor [ <span id="L1208" class="LineNr">1208 </span> <span class="Constant">local-scope</span> <span id="L1209" class="LineNr">1209 </span> <span class="Constant">load-ingredients</span> <span id="L1210" class="LineNr">1210 </span> cursor-row:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-row:offset</span> @@ -1270,7 +1270,7 @@ if ('onhashchange' in window) { <span id="L1212" class="LineNr">1212 </span> before-cursor:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> <span id="L1213" class="LineNr">1213 </span> left:num <span class="Special"><-</span> get *editor, <span class="Constant">left:offset</span> <span id="L1214" class="LineNr">1214 </span> right:num <span class="Special"><-</span> get *editor, <span class="Constant">right:offset</span> -<span id="L1215" class="LineNr">1215 </span> last-line:num <span class="Special"><-</span> subtract screen-height,<span class="Constant"> 1</span> +<span id="L1215" class="LineNr">1215 </span> last-line:num <span class="Special"><-</span> subtract <a href='081print.mu.html#L594'>screen-height</a>,<span class="Constant"> 1</span> <span id="L1216" class="LineNr">1216 </span> already-at-bottom?:bool <span class="Special"><-</span> greater-or-equal cursor-row, last-line <span id="L1217" class="LineNr">1217 </span> <span class="Delimiter">{</span> <span id="L1218" class="LineNr">1218 </span> <span class="Comment"># if cursor not at bottom, move it</span> @@ -1297,7 +1297,7 @@ if ('onhashchange' in window) { <span id="L1239" class="LineNr">1239 </span> <span class="Delimiter">{</span> <span id="L1240" class="LineNr">1240 </span> done?:bool <span class="Special"><-</span> greater-or-equal cursor-column, target-column <span id="L1241" class="LineNr">1241 </span> <span class="muControl">break-if</span> done? -<span id="L1242" class="LineNr">1242 </span> curr:&:duplex-list:char <span class="Special"><-</span> next before-cursor +<span id="L1242" class="LineNr">1242 </span> curr:&:duplex-list:char <span class="Special"><-</span> <a href='065duplex_list.mu.html#L29'>next</a> before-cursor <span id="L1243" class="LineNr">1243 </span> <span class="muControl">break-unless</span> curr <span id="L1244" class="LineNr">1244 </span> currc:char <span class="Special"><-</span> get *curr, <span class="Constant">value:offset</span> <span id="L1245" class="LineNr">1245 </span> at-newline?:bool <span class="Special"><-</span> equal currc, <span class="Constant">10/newline</span> @@ -1322,14 +1322,14 @@ if ('onhashchange' in window) { <span id="L1264" class="LineNr">1264 </span> s:text <span class="Special"><-</span> new <span class="Constant">[abc</span> <span id="L1265" class="LineNr">1265 </span><span class="Constant">de]</span> <span id="L1266" class="LineNr">1266 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">10/right</span> -<span id="L1267" class="LineNr">1267 </span> editor-render screen, e +<span id="L1267" class="LineNr">1267 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L1268" class="LineNr">1268 </span> $clear-trace <span id="L1269" class="LineNr">1269 </span> assume-console [ <span id="L1270" class="LineNr">1270 </span> left-click<span class="Constant"> 1</span>,<span class="Constant"> 3</span> <span id="L1271" class="LineNr">1271 </span> press down-arrow <span id="L1272" class="LineNr">1272 </span> ] <span id="L1273" class="LineNr">1273 </span> run [ -<span id="L1274" class="LineNr">1274 </span> editor-event-loop screen, console, e +<span id="L1274" class="LineNr">1274 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L1275" class="LineNr">1275 </span> 3:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-row:offset</span> <span id="L1276" class="LineNr">1276 </span> 4:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-column:offset</span> <span id="L1277" class="LineNr">1277 </span> ] @@ -1342,7 +1342,7 @@ if ('onhashchange' in window) { <span id="L1284" class="LineNr">1284 </span> type <span class="Constant">[0]</span> <span id="L1285" class="LineNr">1285 </span> ] <span id="L1286" class="LineNr">1286 </span> run [ -<span id="L1287" class="LineNr">1287 </span> editor-event-loop screen, console, e +<span id="L1287" class="LineNr">1287 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L1288" class="LineNr">1288 </span> ] <span id="L1289" class="LineNr">1289 </span> screen-should-contain [ <span id="L1290" class="LineNr">1290 </span> <span class="Constant"> . .</span> @@ -1361,7 +1361,7 @@ if ('onhashchange' in window) { <span id="L1303" class="LineNr">1303 </span> s:text <span class="Special"><-</span> new <span class="Constant">[123</span> <span id="L1304" class="LineNr">1304 </span><span class="Constant">456]</span> <span id="L1305" class="LineNr">1305 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">10/right</span> -<span id="L1306" class="LineNr">1306 </span> editor-render screen, e +<span id="L1306" class="LineNr">1306 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L1307" class="LineNr">1307 </span> $clear-trace <span id="L1308" class="LineNr">1308 </span> <span class="Comment"># start on second line, press ctrl-a</span> <span id="L1309" class="LineNr">1309 </span> assume-console [ @@ -1369,7 +1369,7 @@ if ('onhashchange' in window) { <span id="L1311" class="LineNr">1311 </span> press ctrl-a <span id="L1312" class="LineNr">1312 </span> ] <span id="L1313" class="LineNr">1313 </span> run [ -<span id="L1314" class="LineNr">1314 </span> editor-event-loop screen, console, e +<span id="L1314" class="LineNr">1314 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L1315" class="LineNr">1315 </span> 4:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-row:offset</span> <span id="L1316" class="LineNr">1316 </span> 5:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-column:offset</span> <span id="L1317" class="LineNr">1317 </span> ] @@ -1419,10 +1419,10 @@ if ('onhashchange' in window) { <span id="L1361" class="LineNr">1361 </span> <span class="Delimiter">{</span> <span id="L1362" class="LineNr">1362 </span> at-start-of-text?:bool <span class="Special"><-</span> equal before-cursor, init <span id="L1363" class="LineNr">1363 </span> <span class="muControl">break-if</span> at-start-of-text? -<span id="L1364" class="LineNr">1364 </span> prev:char <span class="Special"><-</span> get *before-cursor, <span class="Constant">value:offset</span> -<span id="L1365" class="LineNr">1365 </span> at-start-of-line?:bool <span class="Special"><-</span> equal prev, <span class="Constant">10/newline</span> +<span id="L1364" class="LineNr">1364 </span> <a href='065duplex_list.mu.html#L36'>prev</a>:char <span class="Special"><-</span> get *before-cursor, <span class="Constant">value:offset</span> +<span id="L1365" class="LineNr">1365 </span> at-start-of-line?:bool <span class="Special"><-</span> equal <a href='065duplex_list.mu.html#L36'>prev</a>, <span class="Constant">10/newline</span> <span id="L1366" class="LineNr">1366 </span> <span class="muControl">break-if</span> at-start-of-line? -<span id="L1367" class="LineNr">1367 </span> before-cursor <span class="Special"><-</span> prev before-cursor +<span id="L1367" class="LineNr">1367 </span> before-cursor <span class="Special"><-</span> <a href='065duplex_list.mu.html#L36'>prev</a> before-cursor <span id="L1368" class="LineNr">1368 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">before-cursor:offset</span>, before-cursor <span id="L1369" class="LineNr">1369 </span> assert before-cursor, <span class="Constant">[move-to-start-of-line tried to move before start of text]</span> <span id="L1370" class="LineNr">1370 </span> <span class="muControl">loop</span> @@ -1435,7 +1435,7 @@ if ('onhashchange' in window) { <span id="L1377" class="LineNr">1377 </span> s:text <span class="Special"><-</span> new <span class="Constant">[123</span> <span id="L1378" class="LineNr">1378 </span><span class="Constant">456]</span> <span id="L1379" class="LineNr">1379 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">10/right</span> -<span id="L1380" class="LineNr">1380 </span> editor-render screen, e +<span id="L1380" class="LineNr">1380 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L1381" class="LineNr">1381 </span> $clear-trace <span id="L1382" class="LineNr">1382 </span> <span class="Comment"># start on first line (no newline before), press ctrl-a</span> <span id="L1383" class="LineNr">1383 </span> assume-console [ @@ -1443,7 +1443,7 @@ if ('onhashchange' in window) { <span id="L1385" class="LineNr">1385 </span> press ctrl-a <span id="L1386" class="LineNr">1386 </span> ] <span id="L1387" class="LineNr">1387 </span> run [ -<span id="L1388" class="LineNr">1388 </span> editor-event-loop screen, console, e +<span id="L1388" class="LineNr">1388 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L1389" class="LineNr">1389 </span> 4:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-row:offset</span> <span id="L1390" class="LineNr">1390 </span> 5:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-column:offset</span> <span id="L1391" class="LineNr">1391 </span> ] @@ -1468,7 +1468,7 @@ if ('onhashchange' in window) { <span id="L1410" class="LineNr">1410 </span> press home <span id="L1411" class="LineNr">1411 </span> ] <span id="L1412" class="LineNr">1412 </span> run [ -<span id="L1413" class="LineNr">1413 </span> editor-event-loop screen, console, e +<span id="L1413" class="LineNr">1413 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L1414" class="LineNr">1414 </span> 3:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-row:offset</span> <span id="L1415" class="LineNr">1415 </span> 4:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-column:offset</span> <span id="L1416" class="LineNr">1416 </span> ] @@ -1486,7 +1486,7 @@ if ('onhashchange' in window) { <span id="L1428" class="LineNr">1428 </span> s:text <span class="Special"><-</span> new <span class="Constant">[123</span> <span id="L1429" class="LineNr">1429 </span><span class="Constant">456]</span> <span id="L1430" class="LineNr">1430 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">10/right</span> -<span id="L1431" class="LineNr">1431 </span> editor-render screen, e +<span id="L1431" class="LineNr">1431 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L1432" class="LineNr">1432 </span> $clear-trace <span id="L1433" class="LineNr">1433 </span> <span class="Comment"># start on first line (no newline before), press 'home'</span> <span id="L1434" class="LineNr">1434 </span> assume-console [ @@ -1494,7 +1494,7 @@ if ('onhashchange' in window) { <span id="L1436" class="LineNr">1436 </span> press home <span id="L1437" class="LineNr">1437 </span> ] <span id="L1438" class="LineNr">1438 </span> run [ -<span id="L1439" class="LineNr">1439 </span> editor-event-loop screen, console, e +<span id="L1439" class="LineNr">1439 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L1440" class="LineNr">1440 </span> 3:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-row:offset</span> <span id="L1441" class="LineNr">1441 </span> 4:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-column:offset</span> <span id="L1442" class="LineNr">1442 </span> ] @@ -1514,7 +1514,7 @@ if ('onhashchange' in window) { <span id="L1456" class="LineNr">1456 </span> s:text <span class="Special"><-</span> new <span class="Constant">[123</span> <span id="L1457" class="LineNr">1457 </span><span class="Constant">456]</span> <span id="L1458" class="LineNr">1458 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">10/right</span> -<span id="L1459" class="LineNr">1459 </span> editor-render screen, e +<span id="L1459" class="LineNr">1459 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L1460" class="LineNr">1460 </span> $clear-trace <span id="L1461" class="LineNr">1461 </span> <span class="Comment"># start on first line, press ctrl-e</span> <span id="L1462" class="LineNr">1462 </span> assume-console [ @@ -1522,7 +1522,7 @@ if ('onhashchange' in window) { <span id="L1464" class="LineNr">1464 </span> press ctrl-e <span id="L1465" class="LineNr">1465 </span> ] <span id="L1466" class="LineNr">1466 </span> run [ -<span id="L1467" class="LineNr">1467 </span> editor-event-loop screen, console, e +<span id="L1467" class="LineNr">1467 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L1468" class="LineNr">1468 </span> 4:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-row:offset</span> <span id="L1469" class="LineNr">1469 </span> 5:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-column:offset</span> <span id="L1470" class="LineNr">1470 </span> ] @@ -1537,7 +1537,7 @@ if ('onhashchange' in window) { <span id="L1479" class="LineNr">1479 </span> type <span class="Constant">[z]</span> <span id="L1480" class="LineNr">1480 </span> ] <span id="L1481" class="LineNr">1481 </span> run [ -<span id="L1482" class="LineNr">1482 </span> editor-event-loop screen, console, e +<span id="L1482" class="LineNr">1482 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L1483" class="LineNr">1483 </span> 4:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-row:offset</span> <span id="L1484" class="LineNr">1484 </span> 5:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-column:offset</span> <span id="L1485" class="LineNr">1485 </span> ] @@ -1586,12 +1586,12 @@ if ('onhashchange' in window) { <span id="L1528" class="LineNr">1528 </span> cursor-column:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-column:offset</span> <span id="L1529" class="LineNr">1529 </span> <span class="Comment"># while not at start of line, move</span> <span id="L1530" class="LineNr">1530 </span> <span class="Delimiter">{</span> -<span id="L1531" class="LineNr">1531 </span> next:&:duplex-list:char <span class="Special"><-</span> next before-cursor -<span id="L1532" class="LineNr">1532 </span> <span class="muControl">break-unless</span> next <span class="Comment"># end of text</span> +<span id="L1531" class="LineNr">1531 </span> <a href='065duplex_list.mu.html#L29'>next</a>:&:duplex-list:char <span class="Special"><-</span> <a href='065duplex_list.mu.html#L29'>next</a> before-cursor +<span id="L1532" class="LineNr">1532 </span> <span class="muControl">break-unless</span> <a href='065duplex_list.mu.html#L29'>next</a> <span class="Comment"># end of text</span> <span id="L1533" class="LineNr">1533 </span> nextc:char <span class="Special"><-</span> get *next, <span class="Constant">value:offset</span> <span id="L1534" class="LineNr">1534 </span> at-end-of-line?:bool <span class="Special"><-</span> equal nextc, <span class="Constant">10/newline</span> <span id="L1535" class="LineNr">1535 </span> <span class="muControl">break-if</span> at-end-of-line? -<span id="L1536" class="LineNr">1536 </span> before-cursor <span class="Special"><-</span> copy next +<span id="L1536" class="LineNr">1536 </span> before-cursor <span class="Special"><-</span> copy <a href='065duplex_list.mu.html#L29'>next</a> <span id="L1537" class="LineNr">1537 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">before-cursor:offset</span>, before-cursor <span id="L1538" class="LineNr">1538 </span> cursor-column <span class="Special"><-</span> add cursor-column,<span class="Constant"> 1</span> <span id="L1539" class="LineNr">1539 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-column:offset</span>, cursor-column @@ -1605,7 +1605,7 @@ if ('onhashchange' in window) { <span id="L1547" class="LineNr">1547 </span> s:text <span class="Special"><-</span> new <span class="Constant">[123</span> <span id="L1548" class="LineNr">1548 </span><span class="Constant">456]</span> <span id="L1549" class="LineNr">1549 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">10/right</span> -<span id="L1550" class="LineNr">1550 </span> editor-render screen, e +<span id="L1550" class="LineNr">1550 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L1551" class="LineNr">1551 </span> $clear-trace <span id="L1552" class="LineNr">1552 </span> <span class="Comment"># start on second line (no newline after), press ctrl-e</span> <span id="L1553" class="LineNr">1553 </span> assume-console [ @@ -1613,7 +1613,7 @@ if ('onhashchange' in window) { <span id="L1555" class="LineNr">1555 </span> press ctrl-e <span id="L1556" class="LineNr">1556 </span> ] <span id="L1557" class="LineNr">1557 </span> run [ -<span id="L1558" class="LineNr">1558 </span> editor-event-loop screen, console, e +<span id="L1558" class="LineNr">1558 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L1559" class="LineNr">1559 </span> 4:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-row:offset</span> <span id="L1560" class="LineNr">1560 </span> 5:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-column:offset</span> <span id="L1561" class="LineNr">1561 </span> ] @@ -1631,7 +1631,7 @@ if ('onhashchange' in window) { <span id="L1573" class="LineNr">1573 </span> s:text <span class="Special"><-</span> new <span class="Constant">[123</span> <span id="L1574" class="LineNr">1574 </span><span class="Constant">456]</span> <span id="L1575" class="LineNr">1575 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">10/right</span> -<span id="L1576" class="LineNr">1576 </span> editor-render screen, e +<span id="L1576" class="LineNr">1576 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L1577" class="LineNr">1577 </span> $clear-trace <span id="L1578" class="LineNr">1578 </span> <span class="Comment"># start on first line, press 'end'</span> <span id="L1579" class="LineNr">1579 </span> assume-console [ @@ -1639,7 +1639,7 @@ if ('onhashchange' in window) { <span id="L1581" class="LineNr">1581 </span> press end <span id="L1582" class="LineNr">1582 </span> ] <span id="L1583" class="LineNr">1583 </span> run [ -<span id="L1584" class="LineNr">1584 </span> editor-event-loop screen, console, e +<span id="L1584" class="LineNr">1584 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L1585" class="LineNr">1585 </span> 3:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-row:offset</span> <span id="L1586" class="LineNr">1586 </span> 4:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-column:offset</span> <span id="L1587" class="LineNr">1587 </span> ] @@ -1657,7 +1657,7 @@ if ('onhashchange' in window) { <span id="L1599" class="LineNr">1599 </span> s:text <span class="Special"><-</span> new <span class="Constant">[123</span> <span id="L1600" class="LineNr">1600 </span><span class="Constant">456]</span> <span id="L1601" class="LineNr">1601 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">10/right</span> -<span id="L1602" class="LineNr">1602 </span> editor-render screen, e +<span id="L1602" class="LineNr">1602 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L1603" class="LineNr">1603 </span> $clear-trace <span id="L1604" class="LineNr">1604 </span> <span class="Comment"># start on second line (no newline after), press 'end'</span> <span id="L1605" class="LineNr">1605 </span> assume-console [ @@ -1665,7 +1665,7 @@ if ('onhashchange' in window) { <span id="L1607" class="LineNr">1607 </span> press end <span id="L1608" class="LineNr">1608 </span> ] <span id="L1609" class="LineNr">1609 </span> run [ -<span id="L1610" class="LineNr">1610 </span> editor-event-loop screen, console, e +<span id="L1610" class="LineNr">1610 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L1611" class="LineNr">1611 </span> 3:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-row:offset</span> <span id="L1612" class="LineNr">1612 </span> 4:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-column:offset</span> <span id="L1613" class="LineNr">1613 </span> ] @@ -1691,7 +1691,7 @@ if ('onhashchange' in window) { <span id="L1633" class="LineNr">1633 </span> press ctrl-u <span id="L1634" class="LineNr">1634 </span> ] <span id="L1635" class="LineNr">1635 </span> run [ -<span id="L1636" class="LineNr">1636 </span> editor-event-loop screen, console, e +<span id="L1636" class="LineNr">1636 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L1637" class="LineNr">1637 </span> ] <span id="L1638" class="LineNr">1638 </span> <span class="Comment"># cursor deletes to start of line</span> <span id="L1639" class="LineNr">1639 </span> screen-should-contain [ @@ -1721,20 +1721,20 @@ if ('onhashchange' in window) { <span id="L1663" class="LineNr">1663 </span> init:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">data:offset</span> <span id="L1664" class="LineNr">1664 </span> before-cursor:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> <span id="L1665" class="LineNr">1665 </span> start:&:duplex-list:char <span class="Special"><-</span> copy before-cursor -<span id="L1666" class="LineNr">1666 </span> end:&:duplex-list:char <span class="Special"><-</span> next before-cursor +<span id="L1666" class="LineNr">1666 </span> end:&:duplex-list:char <span class="Special"><-</span> <a href='065duplex_list.mu.html#L29'>next</a> before-cursor <span id="L1667" class="LineNr">1667 </span> <span class="Delimiter">{</span> <span id="L1668" class="LineNr">1668 </span> at-start-of-text?:bool <span class="Special"><-</span> equal start, init <span id="L1669" class="LineNr">1669 </span> <span class="muControl">break-if</span> at-start-of-text? <span id="L1670" class="LineNr">1670 </span> curr:char <span class="Special"><-</span> get *start, <span class="Constant">value:offset</span> <span id="L1671" class="LineNr">1671 </span> at-start-of-line?:bool <span class="Special"><-</span> equal curr, <span class="Constant">10/newline</span> <span id="L1672" class="LineNr">1672 </span> <span class="muControl">break-if</span> at-start-of-line? -<span id="L1673" class="LineNr">1673 </span> start <span class="Special"><-</span> prev start +<span id="L1673" class="LineNr">1673 </span> start <span class="Special"><-</span> <a href='065duplex_list.mu.html#L36'>prev</a> start <span id="L1674" class="LineNr">1674 </span> assert start, <span class="Constant">[delete-to-start-of-line tried to move before start of text]</span> <span id="L1675" class="LineNr">1675 </span> <span class="muControl">loop</span> <span id="L1676" class="LineNr">1676 </span> <span class="Delimiter">}</span> <span id="L1677" class="LineNr">1677 </span> <span class="Comment"># snip it out</span> -<span id="L1678" class="LineNr">1678 </span> result:&:duplex-list:char <span class="Special"><-</span> next start -<span id="L1679" class="LineNr">1679 </span> remove-between start, end +<span id="L1678" class="LineNr">1678 </span> result:&:duplex-list:char <span class="Special"><-</span> <a href='065duplex_list.mu.html#L29'>next</a> start +<span id="L1679" class="LineNr">1679 </span> <a href='065duplex_list.mu.html#L345'>remove-between</a> start, end <span id="L1680" class="LineNr">1680 </span> <span class="Comment"># adjust cursor</span> <span id="L1681" class="LineNr">1681 </span> before-cursor <span class="Special"><-</span> copy start <span id="L1682" class="LineNr">1682 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">before-cursor:offset</span>, before-cursor @@ -1754,7 +1754,7 @@ if ('onhashchange' in window) { <span id="L1696" class="LineNr">1696 </span> press ctrl-u <span id="L1697" class="LineNr">1697 </span> ] <span id="L1698" class="LineNr">1698 </span> run [ -<span id="L1699" class="LineNr">1699 </span> editor-event-loop screen, console, e +<span id="L1699" class="LineNr">1699 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L1700" class="LineNr">1700 </span> ] <span id="L1701" class="LineNr">1701 </span> <span class="Comment"># cursor deletes to start of line</span> <span id="L1702" class="LineNr">1702 </span> screen-should-contain [ @@ -1778,7 +1778,7 @@ if ('onhashchange' in window) { <span id="L1720" class="LineNr">1720 </span> press ctrl-u <span id="L1721" class="LineNr">1721 </span> ] <span id="L1722" class="LineNr">1722 </span> run [ -<span id="L1723" class="LineNr">1723 </span> editor-event-loop screen, console, e +<span id="L1723" class="LineNr">1723 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L1724" class="LineNr">1724 </span> ] <span id="L1725" class="LineNr">1725 </span> <span class="Comment"># cursor deletes to start of line</span> <span id="L1726" class="LineNr">1726 </span> screen-should-contain [ @@ -1802,7 +1802,7 @@ if ('onhashchange' in window) { <span id="L1744" class="LineNr">1744 </span> press ctrl-u <span id="L1745" class="LineNr">1745 </span> ] <span id="L1746" class="LineNr">1746 </span> run [ -<span id="L1747" class="LineNr">1747 </span> editor-event-loop screen, console, e +<span id="L1747" class="LineNr">1747 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L1748" class="LineNr">1748 </span> ] <span id="L1749" class="LineNr">1749 </span> <span class="Comment"># cursor deletes to start of line</span> <span id="L1750" class="LineNr">1750 </span> screen-should-contain [ @@ -1828,7 +1828,7 @@ if ('onhashchange' in window) { <span id="L1770" class="LineNr">1770 </span> press ctrl-k <span id="L1771" class="LineNr">1771 </span> ] <span id="L1772" class="LineNr">1772 </span> run [ -<span id="L1773" class="LineNr">1773 </span> editor-event-loop screen, console, e +<span id="L1773" class="LineNr">1773 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L1774" class="LineNr">1774 </span> ] <span id="L1775" class="LineNr">1775 </span> <span class="Comment"># cursor deletes to end of line</span> <span id="L1776" class="LineNr">1776 </span> screen-should-contain [ @@ -1856,19 +1856,19 @@ if ('onhashchange' in window) { <span id="L1798" class="LineNr">1798 </span> <span class="Constant">load-ingredients</span> <span id="L1799" class="LineNr">1799 </span> <span class="Comment"># compute range to delete</span> <span id="L1800" class="LineNr">1800 </span> start:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> -<span id="L1801" class="LineNr">1801 </span> end:&:duplex-list:char <span class="Special"><-</span> next start +<span id="L1801" class="LineNr">1801 </span> end:&:duplex-list:char <span class="Special"><-</span> <a href='065duplex_list.mu.html#L29'>next</a> start <span id="L1802" class="LineNr">1802 </span> <span class="Delimiter">{</span> <span id="L1803" class="LineNr">1803 </span> at-end-of-text?:bool <span class="Special"><-</span> equal end, <span class="Constant">0/null</span> <span id="L1804" class="LineNr">1804 </span> <span class="muControl">break-if</span> at-end-of-text? <span id="L1805" class="LineNr">1805 </span> curr:char <span class="Special"><-</span> get *end, <span class="Constant">value:offset</span> <span id="L1806" class="LineNr">1806 </span> at-end-of-line?:bool <span class="Special"><-</span> equal curr, <span class="Constant">10/newline</span> <span id="L1807" class="LineNr">1807 </span> <span class="muControl">break-if</span> at-end-of-line? -<span id="L1808" class="LineNr">1808 </span> end <span class="Special"><-</span> next end +<span id="L1808" class="LineNr">1808 </span> end <span class="Special"><-</span> <a href='065duplex_list.mu.html#L29'>next</a> end <span id="L1809" class="LineNr">1809 </span> <span class="muControl">loop</span> <span id="L1810" class="LineNr">1810 </span> <span class="Delimiter">}</span> <span id="L1811" class="LineNr">1811 </span> <span class="Comment"># snip it out</span> -<span id="L1812" class="LineNr">1812 </span> result <span class="Special"><-</span> next start -<span id="L1813" class="LineNr">1813 </span> remove-between start, end +<span id="L1812" class="LineNr">1812 </span> result <span class="Special"><-</span> <a href='065duplex_list.mu.html#L29'>next</a> start +<span id="L1813" class="LineNr">1813 </span> <a href='065duplex_list.mu.html#L345'>remove-between</a> start, end <span id="L1814" class="LineNr">1814 </span>] <span id="L1815" class="LineNr">1815 </span> <span id="L1816" class="LineNr">1816 </span><span class="muScenario">scenario</span> editor-deletes-to-end-of-line-with-ctrl-k-2 [ @@ -1883,7 +1883,7 @@ if ('onhashchange' in window) { <span id="L1825" class="LineNr">1825 </span> press ctrl-k <span id="L1826" class="LineNr">1826 </span> ] <span id="L1827" class="LineNr">1827 </span> run [ -<span id="L1828" class="LineNr">1828 </span> editor-event-loop screen, console, e +<span id="L1828" class="LineNr">1828 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L1829" class="LineNr">1829 </span> ] <span id="L1830" class="LineNr">1830 </span> <span class="Comment"># cursor deletes to end of line</span> <span id="L1831" class="LineNr">1831 </span> screen-should-contain [ @@ -1907,7 +1907,7 @@ if ('onhashchange' in window) { <span id="L1849" class="LineNr">1849 </span> press ctrl-k <span id="L1850" class="LineNr">1850 </span> ] <span id="L1851" class="LineNr">1851 </span> run [ -<span id="L1852" class="LineNr">1852 </span> editor-event-loop screen, console, e +<span id="L1852" class="LineNr">1852 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L1853" class="LineNr">1853 </span> ] <span id="L1854" class="LineNr">1854 </span> <span class="Comment"># cursor deletes just last character</span> <span id="L1855" class="LineNr">1855 </span> screen-should-contain [ @@ -1931,7 +1931,7 @@ if ('onhashchange' in window) { <span id="L1873" class="LineNr">1873 </span> press ctrl-k <span id="L1874" class="LineNr">1874 </span> ] <span id="L1875" class="LineNr">1875 </span> run [ -<span id="L1876" class="LineNr">1876 </span> editor-event-loop screen, console, e +<span id="L1876" class="LineNr">1876 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L1877" class="LineNr">1877 </span> ] <span id="L1878" class="LineNr">1878 </span> <span class="Comment"># cursor deletes nothing</span> <span id="L1879" class="LineNr">1879 </span> screen-should-contain [ @@ -1955,7 +1955,7 @@ if ('onhashchange' in window) { <span id="L1897" class="LineNr">1897 </span> press ctrl-k <span id="L1898" class="LineNr">1898 </span> ] <span id="L1899" class="LineNr">1899 </span> run [ -<span id="L1900" class="LineNr">1900 </span> editor-event-loop screen, console, e +<span id="L1900" class="LineNr">1900 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L1901" class="LineNr">1901 </span> ] <span id="L1902" class="LineNr">1902 </span> <span class="Comment"># cursor deletes just the final character</span> <span id="L1903" class="LineNr">1903 </span> screen-should-contain [ @@ -1979,7 +1979,7 @@ if ('onhashchange' in window) { <span id="L1921" class="LineNr">1921 </span> press ctrl-k <span id="L1922" class="LineNr">1922 </span> ] <span id="L1923" class="LineNr">1923 </span> run [ -<span id="L1924" class="LineNr">1924 </span> editor-event-loop screen, console, e +<span id="L1924" class="LineNr">1924 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L1925" class="LineNr">1925 </span> ] <span id="L1926" class="LineNr">1926 </span> <span class="Comment"># cursor deletes nothing</span> <span id="L1927" class="LineNr">1927 </span> screen-should-contain [ @@ -2003,7 +2003,7 @@ if ('onhashchange' in window) { <span id="L1945" class="LineNr">1945 </span><span class="Constant">c</span> <span id="L1946" class="LineNr">1946 </span><span class="Constant">d]</span> <span id="L1947" class="LineNr">1947 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">10/right</span> -<span id="L1948" class="LineNr">1948 </span> editor-render screen, e +<span id="L1948" class="LineNr">1948 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L1949" class="LineNr">1949 </span> screen-should-contain [ <span id="L1950" class="LineNr">1950 </span> <span class="Constant"> . .</span> <span id="L1951" class="LineNr">1951 </span> <span class="Constant"> .a .</span> @@ -2016,7 +2016,7 @@ if ('onhashchange' in window) { <span id="L1958" class="LineNr">1958 </span> press down-arrow <span id="L1959" class="LineNr">1959 </span> ] <span id="L1960" class="LineNr">1960 </span> run [ -<span id="L1961" class="LineNr">1961 </span> editor-event-loop screen, console, e +<span id="L1961" class="LineNr">1961 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L1962" class="LineNr">1962 </span> ] <span id="L1963" class="LineNr">1963 </span> <span class="Comment"># screen slides by one line</span> <span id="L1964" class="LineNr">1964 </span> screen-should-contain [ @@ -2053,7 +2053,7 @@ if ('onhashchange' in window) { <span id="L1995" class="LineNr">1995 </span> c:char <span class="Special"><-</span> get *curr, <span class="Constant">value:offset</span> <span id="L1996" class="LineNr">1996 </span> at-newline?:bool <span class="Special"><-</span> equal c, <span class="Constant">10/newline</span> <span id="L1997" class="LineNr">1997 </span> <span class="muControl">break-unless</span> at-newline? -<span id="L1998" class="LineNr">1998 </span> curr <span class="Special"><-</span> next curr +<span id="L1998" class="LineNr">1998 </span> curr <span class="Special"><-</span> <a href='065duplex_list.mu.html#L29'>next</a> curr <span id="L1999" class="LineNr">1999 </span> count <span class="Special"><-</span> add count,<span class="Constant"> 1</span> <span id="L2000" class="LineNr">2000 </span> <span class="Delimiter">}</span> <span id="L2001" class="LineNr">2001 </span> <span class="Delimiter">{</span> @@ -2063,7 +2063,7 @@ if ('onhashchange' in window) { <span id="L2005" class="LineNr">2005 </span> c:char <span class="Special"><-</span> get *curr, <span class="Constant">value:offset</span> <span id="L2006" class="LineNr">2006 </span> at-newline?:bool <span class="Special"><-</span> equal c, <span class="Constant">10/newline</span> <span id="L2007" class="LineNr">2007 </span> <span class="muControl">break-if</span> at-newline? -<span id="L2008" class="LineNr">2008 </span> curr <span class="Special"><-</span> next curr +<span id="L2008" class="LineNr">2008 </span> curr <span class="Special"><-</span> <a href='065duplex_list.mu.html#L29'>next</a> curr <span id="L2009" class="LineNr">2009 </span> count <span class="Special"><-</span> add count,<span class="Constant"> 1</span> <span id="L2010" class="LineNr">2010 </span> <span class="muControl">loop</span> <span id="L2011" class="LineNr">2011 </span> <span class="Delimiter">}</span> @@ -2082,7 +2082,7 @@ if ('onhashchange' in window) { <span id="L2024" class="LineNr">2024 </span><span class="Constant">h</span> <span id="L2025" class="LineNr">2025 </span><span class="Constant">i]</span> <span id="L2026" class="LineNr">2026 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">5/right</span> -<span id="L2027" class="LineNr">2027 </span> editor-render screen, e +<span id="L2027" class="LineNr">2027 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L2028" class="LineNr">2028 </span> screen-should-contain [ <span id="L2029" class="LineNr">2029 </span> <span class="Constant"> . .</span> <span id="L2030" class="LineNr">2030 </span> <span class="Constant"> .abcd↩ .</span> @@ -2095,7 +2095,7 @@ if ('onhashchange' in window) { <span id="L2037" class="LineNr">2037 </span> press down-arrow <span id="L2038" class="LineNr">2038 </span> ] <span id="L2039" class="LineNr">2039 </span> run [ -<span id="L2040" class="LineNr">2040 </span> editor-event-loop screen, console, e +<span id="L2040" class="LineNr">2040 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2041" class="LineNr">2041 </span> ] <span id="L2042" class="LineNr">2042 </span> <span class="Comment"># screen shows partial wrapped line</span> <span id="L2043" class="LineNr">2043 </span> screen-should-contain [ @@ -2122,7 +2122,7 @@ if ('onhashchange' in window) { <span id="L2064" class="LineNr">2064 </span> press down-arrow <span id="L2065" class="LineNr">2065 </span> ] <span id="L2066" class="LineNr">2066 </span> run [ -<span id="L2067" class="LineNr">2067 </span> editor-event-loop screen, console, e +<span id="L2067" class="LineNr">2067 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2068" class="LineNr">2068 </span> ] <span id="L2069" class="LineNr">2069 </span> <span class="Comment"># screen shows partial wrapped line containing a wrap icon</span> <span id="L2070" class="LineNr">2070 </span> screen-should-contain [ @@ -2136,7 +2136,7 @@ if ('onhashchange' in window) { <span id="L2078" class="LineNr">2078 </span> press down-arrow <span id="L2079" class="LineNr">2079 </span> ] <span id="L2080" class="LineNr">2080 </span> run [ -<span id="L2081" class="LineNr">2081 </span> editor-event-loop screen, console, e +<span id="L2081" class="LineNr">2081 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2082" class="LineNr">2082 </span> ] <span id="L2083" class="LineNr">2083 </span> <span class="Comment"># screen shows partial wrapped line</span> <span id="L2084" class="LineNr">2084 </span> screen-should-contain [ @@ -2162,7 +2162,7 @@ if ('onhashchange' in window) { <span id="L2104" class="LineNr">2104 </span> type <span class="Constant">[g]</span> <span id="L2105" class="LineNr">2105 </span> ] <span id="L2106" class="LineNr">2106 </span> run [ -<span id="L2107" class="LineNr">2107 </span> editor-event-loop screen, console, e +<span id="L2107" class="LineNr">2107 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2108" class="LineNr">2108 </span> 3:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-row:offset</span> <span id="L2109" class="LineNr">2109 </span> 4:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-column:offset</span> <span id="L2110" class="LineNr">2110 </span> ] @@ -2193,7 +2193,7 @@ if ('onhashchange' in window) { <span id="L2135" class="LineNr">2135 </span>] <span id="L2136" class="LineNr">2136 </span> ] <span id="L2137" class="LineNr">2137 </span> run [ -<span id="L2138" class="LineNr">2138 </span> editor-event-loop screen, console, e +<span id="L2138" class="LineNr">2138 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2139" class="LineNr">2139 </span> 3:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-row:offset</span> <span id="L2140" class="LineNr">2140 </span> 4:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-column:offset</span> <span id="L2141" class="LineNr">2141 </span> ] @@ -2225,7 +2225,7 @@ if ('onhashchange' in window) { <span id="L2167" class="LineNr">2167 </span> press right-arrow <span id="L2168" class="LineNr">2168 </span> ] <span id="L2169" class="LineNr">2169 </span> run [ -<span id="L2170" class="LineNr">2170 </span> editor-event-loop screen, console, e +<span id="L2170" class="LineNr">2170 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2171" class="LineNr">2171 </span> 3:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-row:offset</span> <span id="L2172" class="LineNr">2172 </span> 4:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-column:offset</span> <span id="L2173" class="LineNr">2173 </span> ] @@ -2258,7 +2258,7 @@ if ('onhashchange' in window) { <span id="L2200" class="LineNr">2200 </span> press right-arrow <span id="L2201" class="LineNr">2201 </span> ] <span id="L2202" class="LineNr">2202 </span> run [ -<span id="L2203" class="LineNr">2203 </span> editor-event-loop screen, console, e +<span id="L2203" class="LineNr">2203 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2204" class="LineNr">2204 </span> 3:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-row:offset</span> <span id="L2205" class="LineNr">2205 </span> 4:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-column:offset</span> <span id="L2206" class="LineNr">2206 </span> ] @@ -2281,7 +2281,7 @@ if ('onhashchange' in window) { <span id="L2223" class="LineNr">2223 </span> s:text <span class="Special"><-</span> new <span class="Constant">[abc</span> <span id="L2224" class="LineNr">2224 </span><span class="Constant">de]</span> <span id="L2225" class="LineNr">2225 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">10/right</span> -<span id="L2226" class="LineNr">2226 </span> editor-render screen, e +<span id="L2226" class="LineNr">2226 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L2227" class="LineNr">2227 </span> $clear-trace <span id="L2228" class="LineNr">2228 </span> <span class="Comment"># try to move down past end of text</span> <span id="L2229" class="LineNr">2229 </span> assume-console [ @@ -2289,7 +2289,7 @@ if ('onhashchange' in window) { <span id="L2231" class="LineNr">2231 </span> press down-arrow <span id="L2232" class="LineNr">2232 </span> ] <span id="L2233" class="LineNr">2233 </span> run [ -<span id="L2234" class="LineNr">2234 </span> editor-event-loop screen, console, e +<span id="L2234" class="LineNr">2234 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2235" class="LineNr">2235 </span> 3:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-row:offset</span> <span id="L2236" class="LineNr">2236 </span> 4:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-column:offset</span> <span id="L2237" class="LineNr">2237 </span> ] @@ -2302,7 +2302,7 @@ if ('onhashchange' in window) { <span id="L2244" class="LineNr">2244 </span> type <span class="Constant">[0]</span> <span id="L2245" class="LineNr">2245 </span> ] <span id="L2246" class="LineNr">2246 </span> run [ -<span id="L2247" class="LineNr">2247 </span> editor-event-loop screen, console, e +<span id="L2247" class="LineNr">2247 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2248" class="LineNr">2248 </span> ] <span id="L2249" class="LineNr">2249 </span> screen-should-contain [ <span id="L2250" class="LineNr">2250 </span> <span class="Constant"> . .</span> @@ -2317,7 +2317,7 @@ if ('onhashchange' in window) { <span id="L2259" class="LineNr">2259 </span> press down-arrow <span id="L2260" class="LineNr">2260 </span> ] <span id="L2261" class="LineNr">2261 </span> run [ -<span id="L2262" class="LineNr">2262 </span> editor-event-loop screen, console, e +<span id="L2262" class="LineNr">2262 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2263" class="LineNr">2263 </span> 3:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-row:offset</span> <span id="L2264" class="LineNr">2264 </span> 4:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-column:offset</span> <span id="L2265" class="LineNr">2265 </span> ] @@ -2331,7 +2331,7 @@ if ('onhashchange' in window) { <span id="L2273" class="LineNr">2273 </span> type <span class="Constant">[1]</span> <span id="L2274" class="LineNr">2274 </span> ] <span id="L2275" class="LineNr">2275 </span> run [ -<span id="L2276" class="LineNr">2276 </span> editor-event-loop screen, console, e +<span id="L2276" class="LineNr">2276 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2277" class="LineNr">2277 </span> ] <span id="L2278" class="LineNr">2278 </span> screen-should-contain [ <span id="L2279" class="LineNr">2279 </span> <span class="Constant"> . .</span> @@ -2354,7 +2354,7 @@ if ('onhashchange' in window) { <span id="L2296" class="LineNr">2296 </span><span class="Constant">f</span> <span id="L2297" class="LineNr">2297 </span><span class="Constant">g]</span> <span id="L2298" class="LineNr">2298 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">5/right</span> -<span id="L2299" class="LineNr">2299 </span> editor-render screen, e +<span id="L2299" class="LineNr">2299 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L2300" class="LineNr">2300 </span> <span class="Comment"># scroll down one page and one line</span> <span id="L2301" class="LineNr">2301 </span> assume-console [ <span id="L2302" class="LineNr">2302 </span> press page-down @@ -2362,7 +2362,7 @@ if ('onhashchange' in window) { <span id="L2304" class="LineNr">2304 </span> press down-arrow <span id="L2305" class="LineNr">2305 </span> ] <span id="L2306" class="LineNr">2306 </span> run [ -<span id="L2307" class="LineNr">2307 </span> editor-event-loop screen, console, e +<span id="L2307" class="LineNr">2307 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2308" class="LineNr">2308 </span> ] <span id="L2309" class="LineNr">2309 </span> <span class="Comment"># screen scrolls down 3 lines</span> <span id="L2310" class="LineNr">2310 </span> screen-should-contain [ @@ -2385,7 +2385,7 @@ if ('onhashchange' in window) { <span id="L2327" class="LineNr">2327 </span><span class="Constant">c</span> <span id="L2328" class="LineNr">2328 </span><span class="Constant">d]</span> <span id="L2329" class="LineNr">2329 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">10/right</span> -<span id="L2330" class="LineNr">2330 </span> editor-render screen, e +<span id="L2330" class="LineNr">2330 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L2331" class="LineNr">2331 </span> screen-should-contain [ <span id="L2332" class="LineNr">2332 </span> <span class="Constant"> . .</span> <span id="L2333" class="LineNr">2333 </span> <span class="Constant"> .a .</span> @@ -2398,7 +2398,7 @@ if ('onhashchange' in window) { <span id="L2340" class="LineNr">2340 </span> press up-arrow <span id="L2341" class="LineNr">2341 </span> ] <span id="L2342" class="LineNr">2342 </span> run [ -<span id="L2343" class="LineNr">2343 </span> editor-event-loop screen, console, e +<span id="L2343" class="LineNr">2343 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2344" class="LineNr">2344 </span> ] <span id="L2345" class="LineNr">2345 </span> <span class="Comment"># screen slides by one line</span> <span id="L2346" class="LineNr">2346 </span> screen-should-contain [ @@ -2438,9 +2438,9 @@ if ('onhashchange' in window) { <span id="L2380" class="LineNr">2380 </span> <span class="Delimiter">{</span> <span id="L2381" class="LineNr">2381 </span> <span class="muControl">break-if</span> len <span id="L2382" class="LineNr">2382 </span> <span class="Comment"># empty line; just skip this newline</span> -<span id="L2383" class="LineNr">2383 </span> prev:&:duplex-list:char <span class="Special"><-</span> prev curr -<span id="L2384" class="LineNr">2384 </span> <span class="muControl">return-unless</span> prev, curr -<span id="L2385" class="LineNr">2385 </span> <span class="muControl">return</span> prev +<span id="L2383" class="LineNr">2383 </span> <a href='065duplex_list.mu.html#L36'>prev</a>:&:duplex-list:char <span class="Special"><-</span> <a href='065duplex_list.mu.html#L36'>prev</a> curr +<span id="L2384" class="LineNr">2384 </span> <span class="muControl">return-unless</span> <a href='065duplex_list.mu.html#L36'>prev</a>, curr +<span id="L2385" class="LineNr">2385 </span> <span class="muControl">return</span> <a href='065duplex_list.mu.html#L36'>prev</a> <span id="L2386" class="LineNr">2386 </span> <span class="Delimiter">}</span> <span id="L2387" class="LineNr">2387 </span> _, max:num <span class="Special"><-</span> divide-with-remainder len, max-line-length <span id="L2388" class="LineNr">2388 </span> <span class="Comment"># remainder 0 => scan one width-worth</span> @@ -2454,9 +2454,9 @@ if ('onhashchange' in window) { <span id="L2396" class="LineNr">2396 </span> <span class="Delimiter">{</span> <span id="L2397" class="LineNr">2397 </span> done?:bool <span class="Special"><-</span> greater-or-equal count, max <span id="L2398" class="LineNr">2398 </span> <span class="muControl">break-if</span> done? -<span id="L2399" class="LineNr">2399 </span> prev:&:duplex-list:char <span class="Special"><-</span> prev curr -<span id="L2400" class="LineNr">2400 </span> <span class="muControl">break-unless</span> prev -<span id="L2401" class="LineNr">2401 </span> curr <span class="Special"><-</span> copy prev +<span id="L2399" class="LineNr">2399 </span> <a href='065duplex_list.mu.html#L36'>prev</a>:&:duplex-list:char <span class="Special"><-</span> <a href='065duplex_list.mu.html#L36'>prev</a> curr +<span id="L2400" class="LineNr">2400 </span> <span class="muControl">break-unless</span> <a href='065duplex_list.mu.html#L36'>prev</a> +<span id="L2401" class="LineNr">2401 </span> curr <span class="Special"><-</span> copy <a href='065duplex_list.mu.html#L36'>prev</a> <span id="L2402" class="LineNr">2402 </span> count <span class="Special"><-</span> add count,<span class="Constant"> 1</span> <span id="L2403" class="LineNr">2403 </span> <span class="muControl">loop</span> <span id="L2404" class="LineNr">2404 </span> <span class="Delimiter">}</span> @@ -2474,7 +2474,7 @@ if ('onhashchange' in window) { <span id="L2416" class="LineNr">2416 </span><span class="Constant">h</span> <span id="L2417" class="LineNr">2417 </span><span class="Constant">i]</span> <span id="L2418" class="LineNr">2418 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">5/right</span> -<span id="L2419" class="LineNr">2419 </span> editor-render screen, e +<span id="L2419" class="LineNr">2419 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L2420" class="LineNr">2420 </span> screen-should-contain [ <span id="L2421" class="LineNr">2421 </span> <span class="Constant"> . .</span> <span id="L2422" class="LineNr">2422 </span> <span class="Constant"> .abcd↩ .</span> @@ -2486,7 +2486,7 @@ if ('onhashchange' in window) { <span id="L2428" class="LineNr">2428 </span> press page-down <span id="L2429" class="LineNr">2429 </span> ] <span id="L2430" class="LineNr">2430 </span> run [ -<span id="L2431" class="LineNr">2431 </span> editor-event-loop screen, console, e +<span id="L2431" class="LineNr">2431 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2432" class="LineNr">2432 </span> ] <span id="L2433" class="LineNr">2433 </span> screen-should-contain [ <span id="L2434" class="LineNr">2434 </span> <span class="Constant"> . .</span> @@ -2499,7 +2499,7 @@ if ('onhashchange' in window) { <span id="L2441" class="LineNr">2441 </span> press up-arrow <span id="L2442" class="LineNr">2442 </span> ] <span id="L2443" class="LineNr">2443 </span> run [ -<span id="L2444" class="LineNr">2444 </span> editor-event-loop screen, console, e +<span id="L2444" class="LineNr">2444 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2445" class="LineNr">2445 </span> ] <span id="L2446" class="LineNr">2446 </span> <span class="Comment"># screen shows partial wrapped line</span> <span id="L2447" class="LineNr">2447 </span> screen-should-contain [ @@ -2520,13 +2520,13 @@ if ('onhashchange' in window) { <span id="L2462" class="LineNr">2462 </span><span class="Constant">l</span> <span id="L2463" class="LineNr">2463 </span><span class="Constant">m]</span> <span id="L2464" class="LineNr">2464 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">5/right</span> -<span id="L2465" class="LineNr">2465 </span> editor-render screen, e +<span id="L2465" class="LineNr">2465 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L2466" class="LineNr">2466 </span> <span class="Comment"># position cursor at top of second page</span> <span id="L2467" class="LineNr">2467 </span> assume-console [ <span id="L2468" class="LineNr">2468 </span> press page-down <span id="L2469" class="LineNr">2469 </span> ] <span id="L2470" class="LineNr">2470 </span> run [ -<span id="L2471" class="LineNr">2471 </span> editor-event-loop screen, console, e +<span id="L2471" class="LineNr">2471 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2472" class="LineNr">2472 </span> ] <span id="L2473" class="LineNr">2473 </span> screen-should-contain [ <span id="L2474" class="LineNr">2474 </span> <span class="Constant"> . .</span> @@ -2540,7 +2540,7 @@ if ('onhashchange' in window) { <span id="L2482" class="LineNr">2482 </span> press up-arrow <span id="L2483" class="LineNr">2483 </span> ] <span id="L2484" class="LineNr">2484 </span> run [ -<span id="L2485" class="LineNr">2485 </span> editor-event-loop screen, console, e +<span id="L2485" class="LineNr">2485 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2486" class="LineNr">2486 </span> ] <span id="L2487" class="LineNr">2487 </span> <span class="Comment"># screen shows partial wrapped line</span> <span id="L2488" class="LineNr">2488 </span> screen-should-contain [ @@ -2555,7 +2555,7 @@ if ('onhashchange' in window) { <span id="L2497" class="LineNr">2497 </span> press up-arrow <span id="L2498" class="LineNr">2498 </span> ] <span id="L2499" class="LineNr">2499 </span> run [ -<span id="L2500" class="LineNr">2500 </span> editor-event-loop screen, console, e +<span id="L2500" class="LineNr">2500 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2501" class="LineNr">2501 </span> ] <span id="L2502" class="LineNr">2502 </span> <span class="Comment"># screen shows partial wrapped line</span> <span id="L2503" class="LineNr">2503 </span> screen-should-contain [ @@ -2570,7 +2570,7 @@ if ('onhashchange' in window) { <span id="L2512" class="LineNr">2512 </span> press up-arrow <span id="L2513" class="LineNr">2513 </span> ] <span id="L2514" class="LineNr">2514 </span> run [ -<span id="L2515" class="LineNr">2515 </span> editor-event-loop screen, console, e +<span id="L2515" class="LineNr">2515 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2516" class="LineNr">2516 </span> ] <span id="L2517" class="LineNr">2517 </span> <span class="Comment"># screen shows partial wrapped line</span> <span id="L2518" class="LineNr">2518 </span> screen-should-contain [ @@ -2595,7 +2595,7 @@ if ('onhashchange' in window) { <span id="L2537" class="LineNr">2537 </span><span class="Constant">h</span> <span id="L2538" class="LineNr">2538 </span><span class="Constant">i]</span> <span id="L2539" class="LineNr">2539 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">6/right</span> -<span id="L2540" class="LineNr">2540 </span> editor-render screen, e +<span id="L2540" class="LineNr">2540 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L2541" class="LineNr">2541 </span> screen-should-contain [ <span id="L2542" class="LineNr">2542 </span> <span class="Constant"> . .</span> <span id="L2543" class="LineNr">2543 </span> <span class="Constant"> .abcde↩ .</span> @@ -2607,7 +2607,7 @@ if ('onhashchange' in window) { <span id="L2549" class="LineNr">2549 </span> press page-down <span id="L2550" class="LineNr">2550 </span> ] <span id="L2551" class="LineNr">2551 </span> run [ -<span id="L2552" class="LineNr">2552 </span> editor-event-loop screen, console, e +<span id="L2552" class="LineNr">2552 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2553" class="LineNr">2553 </span> ] <span id="L2554" class="LineNr">2554 </span> screen-should-contain [ <span id="L2555" class="LineNr">2555 </span> <span class="Constant"> . .</span> @@ -2620,7 +2620,7 @@ if ('onhashchange' in window) { <span id="L2562" class="LineNr">2562 </span> press up-arrow <span id="L2563" class="LineNr">2563 </span> ] <span id="L2564" class="LineNr">2564 </span> run [ -<span id="L2565" class="LineNr">2565 </span> editor-event-loop screen, console, e +<span id="L2565" class="LineNr">2565 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2566" class="LineNr">2566 </span> ] <span id="L2567" class="LineNr">2567 </span> <span class="Comment"># screen shows partial wrapped line</span> <span id="L2568" class="LineNr">2568 </span> screen-should-contain [ @@ -2643,12 +2643,12 @@ if ('onhashchange' in window) { <span id="L2585" class="LineNr">2585 </span>d <span id="L2586" class="LineNr">2586 </span>e] <span id="L2587" class="LineNr">2587 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">6/right</span> -<span id="L2588" class="LineNr">2588 </span> editor-render screen, e +<span id="L2588" class="LineNr">2588 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L2589" class="LineNr">2589 </span> assume-console [ <span id="L2590" class="LineNr">2590 </span> press page-down <span id="L2591" class="LineNr">2591 </span> ] <span id="L2592" class="LineNr">2592 </span> run [ -<span id="L2593" class="LineNr">2593 </span> editor-event-loop screen, console, e +<span id="L2593" class="LineNr">2593 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2594" class="LineNr">2594 </span> ] <span id="L2595" class="LineNr">2595 </span> screen-should-contain [ <span id="L2596" class="LineNr">2596 </span> <span class="Constant"> . .</span> @@ -2660,7 +2660,7 @@ if ('onhashchange' in window) { <span id="L2602" class="LineNr">2602 </span> press page-down <span id="L2603" class="LineNr">2603 </span> ] <span id="L2604" class="LineNr">2604 </span> run [ -<span id="L2605" class="LineNr">2605 </span> editor-event-loop screen, console, e +<span id="L2605" class="LineNr">2605 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2606" class="LineNr">2606 </span> ] <span id="L2607" class="LineNr">2607 </span> screen-should-contain [ <span id="L2608" class="LineNr">2608 </span> <span class="Constant"> . .</span> @@ -2672,7 +2672,7 @@ if ('onhashchange' in window) { <span id="L2614" class="LineNr">2614 </span> press page-up <span id="L2615" class="LineNr">2615 </span> ] <span id="L2616" class="LineNr">2616 </span> run [ -<span id="L2617" class="LineNr">2617 </span> editor-event-loop screen, console, e +<span id="L2617" class="LineNr">2617 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2618" class="LineNr">2618 </span> ] <span id="L2619" class="LineNr">2619 </span> screen-should-contain [ <span id="L2620" class="LineNr">2620 </span> <span class="Constant"> . .</span> @@ -2693,13 +2693,13 @@ if ('onhashchange' in window) { <span id="L2635" class="LineNr">2635 </span><span class="Constant">d</span> <span id="L2636" class="LineNr">2636 </span><span class="Constant">e]</span> <span id="L2637" class="LineNr">2637 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">5/right</span> -<span id="L2638" class="LineNr">2638 </span> editor-render screen, e +<span id="L2638" class="LineNr">2638 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L2639" class="LineNr">2639 </span> <span class="Comment"># position cursor at top of second page</span> <span id="L2640" class="LineNr">2640 </span> assume-console [ <span id="L2641" class="LineNr">2641 </span> press page-down <span id="L2642" class="LineNr">2642 </span> ] <span id="L2643" class="LineNr">2643 </span> run [ -<span id="L2644" class="LineNr">2644 </span> editor-event-loop screen, console, e +<span id="L2644" class="LineNr">2644 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2645" class="LineNr">2645 </span> ] <span id="L2646" class="LineNr">2646 </span> screen-should-contain [ <span id="L2647" class="LineNr">2647 </span> <span class="Constant"> . .</span> @@ -2712,7 +2712,7 @@ if ('onhashchange' in window) { <span id="L2654" class="LineNr">2654 </span> press left-arrow <span id="L2655" class="LineNr">2655 </span> ] <span id="L2656" class="LineNr">2656 </span> run [ -<span id="L2657" class="LineNr">2657 </span> editor-event-loop screen, console, e +<span id="L2657" class="LineNr">2657 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2658" class="LineNr">2658 </span> 3:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-row:offset</span> <span id="L2659" class="LineNr">2659 </span> 4:num/<span class="Special">raw</span> <span class="Special"><-</span> get *e, <span class="Constant">cursor-column:offset</span> <span id="L2660" class="LineNr">2660 </span> ] @@ -2739,7 +2739,7 @@ if ('onhashchange' in window) { <span id="L2681" class="LineNr">2681 </span><span class="Constant">c</span> <span id="L2682" class="LineNr">2682 </span><span class="Constant">d]</span> <span id="L2683" class="LineNr">2683 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">10/right</span> -<span id="L2684" class="LineNr">2684 </span> editor-render screen, e +<span id="L2684" class="LineNr">2684 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L2685" class="LineNr">2685 </span> screen-should-contain [ <span id="L2686" class="LineNr">2686 </span> <span class="Constant"> . .</span> <span id="L2687" class="LineNr">2687 </span> <span class="Constant"> .a .</span> @@ -2754,7 +2754,7 @@ if ('onhashchange' in window) { <span id="L2696" class="LineNr">2696 </span> press up-arrow <span id="L2697" class="LineNr">2697 </span> ] <span id="L2698" class="LineNr">2698 </span> run [ -<span id="L2699" class="LineNr">2699 </span> editor-event-loop screen, console, e +<span id="L2699" class="LineNr">2699 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2700" class="LineNr">2700 </span> ] <span id="L2701" class="LineNr">2701 </span> <span class="Comment"># screen slides by one line</span> <span id="L2702" class="LineNr">2702 </span> screen-should-contain [ @@ -2768,7 +2768,7 @@ if ('onhashchange' in window) { <span id="L2710" class="LineNr">2710 </span> press up-arrow <span id="L2711" class="LineNr">2711 </span> ] <span id="L2712" class="LineNr">2712 </span> run [ -<span id="L2713" class="LineNr">2713 </span> editor-event-loop screen, console, e +<span id="L2713" class="LineNr">2713 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2714" class="LineNr">2714 </span> ] <span id="L2715" class="LineNr">2715 </span> <span class="Comment"># screen remains unchanged</span> <span id="L2716" class="LineNr">2716 </span> screen-should-contain [ @@ -2789,7 +2789,7 @@ if ('onhashchange' in window) { <span id="L2731" class="LineNr">2731 </span><span class="Constant">c</span> <span id="L2732" class="LineNr">2732 </span><span class="Constant">d]</span> <span id="L2733" class="LineNr">2733 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">10/right</span> -<span id="L2734" class="LineNr">2734 </span> editor-render screen, e +<span id="L2734" class="LineNr">2734 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L2735" class="LineNr">2735 </span> screen-should-contain [ <span id="L2736" class="LineNr">2736 </span> <span class="Constant"> . .</span> <span id="L2737" class="LineNr">2737 </span> <span class="Constant"> .a .</span> @@ -2801,7 +2801,7 @@ if ('onhashchange' in window) { <span id="L2743" class="LineNr">2743 </span> press page-down <span id="L2744" class="LineNr">2744 </span> ] <span id="L2745" class="LineNr">2745 </span> run [ -<span id="L2746" class="LineNr">2746 </span> editor-event-loop screen, console, e +<span id="L2746" class="LineNr">2746 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2747" class="LineNr">2747 </span> ] <span id="L2748" class="LineNr">2748 </span> <span class="Comment"># screen shows next page</span> <span id="L2749" class="LineNr">2749 </span> screen-should-contain [ @@ -2852,14 +2852,14 @@ if ('onhashchange' in window) { <span id="L2794" class="LineNr">2794 </span> <span class="muControl">return-unless</span> bottom-of-screen <span id="L2795" class="LineNr">2795 </span> <span class="Comment"># if not, position cursor at final character</span> <span id="L2796" class="LineNr">2796 </span> before-cursor:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> -<span id="L2797" class="LineNr">2797 </span> before-cursor:&:duplex-list:char <span class="Special"><-</span> prev bottom-of-screen +<span id="L2797" class="LineNr">2797 </span> before-cursor:&:duplex-list:char <span class="Special"><-</span> <a href='065duplex_list.mu.html#L36'>prev</a> bottom-of-screen <span id="L2798" class="LineNr">2798 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">before-cursor:offset</span>, before-cursor <span id="L2799" class="LineNr">2799 </span> <span class="Comment"># keep one line in common with previous page</span> <span id="L2800" class="LineNr">2800 </span> <span class="Delimiter">{</span> -<span id="L2801" class="LineNr">2801 </span> last:char <span class="Special"><-</span> get *before-cursor, <span class="Constant">value:offset</span> -<span id="L2802" class="LineNr">2802 </span> newline?:bool <span class="Special"><-</span> equal last, <span class="Constant">10/newline</span> +<span id="L2801" class="LineNr">2801 </span> <a href='065duplex_list.mu.html#L516'>last</a>:char <span class="Special"><-</span> get *before-cursor, <span class="Constant">value:offset</span> +<span id="L2802" class="LineNr">2802 </span> newline?:bool <span class="Special"><-</span> equal <a href='065duplex_list.mu.html#L516'>last</a>, <span class="Constant">10/newline</span> <span id="L2803" class="LineNr">2803 </span> <span class="muControl">break-unless</span> newline?:bool -<span id="L2804" class="LineNr">2804 </span> before-cursor <span class="Special"><-</span> prev before-cursor +<span id="L2804" class="LineNr">2804 </span> before-cursor <span class="Special"><-</span> <a href='065duplex_list.mu.html#L36'>prev</a> before-cursor <span id="L2805" class="LineNr">2805 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">before-cursor:offset</span>, before-cursor <span id="L2806" class="LineNr">2806 </span> <span class="Delimiter">}</span> <span id="L2807" class="LineNr">2807 </span> <span class="Comment"># move cursor and top-of-screen to start of that line</span> @@ -2874,7 +2874,7 @@ if ('onhashchange' in window) { <span id="L2816" class="LineNr">2816 </span> s:text <span class="Special"><-</span> new <span class="Constant">[a</span> <span id="L2817" class="LineNr">2817 </span><span class="Constant">b]</span> <span id="L2818" class="LineNr">2818 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">10/right</span> -<span id="L2819" class="LineNr">2819 </span> editor-render screen, e +<span id="L2819" class="LineNr">2819 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L2820" class="LineNr">2820 </span> screen-should-contain [ <span id="L2821" class="LineNr">2821 </span> <span class="Constant"> . .</span> <span id="L2822" class="LineNr">2822 </span> <span class="Constant"> .a .</span> @@ -2886,7 +2886,7 @@ if ('onhashchange' in window) { <span id="L2828" class="LineNr">2828 </span> press page-down <span id="L2829" class="LineNr">2829 </span> ] <span id="L2830" class="LineNr">2830 </span> run [ -<span id="L2831" class="LineNr">2831 </span> editor-event-loop screen, console, e +<span id="L2831" class="LineNr">2831 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2832" class="LineNr">2832 </span> ] <span id="L2833" class="LineNr">2833 </span> <span class="Comment"># screen remains unmodified</span> <span id="L2834" class="LineNr">2834 </span> screen-should-contain [ @@ -2907,7 +2907,7 @@ if ('onhashchange' in window) { <span id="L2849" class="LineNr">2849 </span><span class="Constant">cdefgh]</span> <span id="L2850" class="LineNr">2850 </span> <span class="Comment"># editor screen triggers wrap of last line</span> <span id="L2851" class="LineNr">2851 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">4/right</span> -<span id="L2852" class="LineNr">2852 </span> editor-render screen, e +<span id="L2852" class="LineNr">2852 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L2853" class="LineNr">2853 </span> <span class="Comment"># some part of last line is not displayed</span> <span id="L2854" class="LineNr">2854 </span> screen-should-contain [ <span id="L2855" class="LineNr">2855 </span> <span class="Constant"> . .</span> @@ -2920,7 +2920,7 @@ if ('onhashchange' in window) { <span id="L2862" class="LineNr">2862 </span> press page-down <span id="L2863" class="LineNr">2863 </span> ] <span id="L2864" class="LineNr">2864 </span> run [ -<span id="L2865" class="LineNr">2865 </span> editor-event-loop screen, console, e +<span id="L2865" class="LineNr">2865 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2866" class="LineNr">2866 </span> ] <span id="L2867" class="LineNr">2867 </span> <span class="Comment"># screen shows entire wrapped line</span> <span id="L2868" class="LineNr">2868 </span> screen-should-contain [ @@ -2940,7 +2940,7 @@ if ('onhashchange' in window) { <span id="L2882" class="LineNr">2882 </span> s:text <span class="Special"><-</span> new <span class="Constant">[a</span> <span id="L2883" class="LineNr">2883 </span><span class="Constant">bcdefgh]</span> <span id="L2884" class="LineNr">2884 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">4/right</span> -<span id="L2885" class="LineNr">2885 </span> editor-render screen, e +<span id="L2885" class="LineNr">2885 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L2886" class="LineNr">2886 </span> <span class="Comment"># some part of last line is not displayed</span> <span id="L2887" class="LineNr">2887 </span> screen-should-contain [ <span id="L2888" class="LineNr">2888 </span> <span class="Constant"> . .</span> @@ -2953,7 +2953,7 @@ if ('onhashchange' in window) { <span id="L2895" class="LineNr">2895 </span> press page-down <span id="L2896" class="LineNr">2896 </span> ] <span id="L2897" class="LineNr">2897 </span> run [ -<span id="L2898" class="LineNr">2898 </span> editor-event-loop screen, console, e +<span id="L2898" class="LineNr">2898 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2899" class="LineNr">2899 </span> ] <span id="L2900" class="LineNr">2900 </span> <span class="Comment"># screen shows entire wrapped line</span> <span id="L2901" class="LineNr">2901 </span> screen-should-contain [ @@ -2974,7 +2974,7 @@ if ('onhashchange' in window) { <span id="L2916" class="LineNr">2916 </span><span class="Constant">c</span> <span id="L2917" class="LineNr">2917 </span><span class="Constant">d]</span> <span id="L2918" class="LineNr">2918 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">10/right</span> -<span id="L2919" class="LineNr">2919 </span> editor-render screen, e +<span id="L2919" class="LineNr">2919 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L2920" class="LineNr">2920 </span> screen-should-contain [ <span id="L2921" class="LineNr">2921 </span> <span class="Constant"> . .</span> <span id="L2922" class="LineNr">2922 </span> <span class="Constant"> .a .</span> @@ -2986,7 +2986,7 @@ if ('onhashchange' in window) { <span id="L2928" class="LineNr">2928 </span> press page-down <span id="L2929" class="LineNr">2929 </span> ] <span id="L2930" class="LineNr">2930 </span> run [ -<span id="L2931" class="LineNr">2931 </span> editor-event-loop screen, console, e +<span id="L2931" class="LineNr">2931 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2932" class="LineNr">2932 </span> ] <span id="L2933" class="LineNr">2933 </span> <span class="Comment"># screen shows next page</span> <span id="L2934" class="LineNr">2934 </span> screen-should-contain [ @@ -3000,7 +3000,7 @@ if ('onhashchange' in window) { <span id="L2942" class="LineNr">2942 </span> press page-up <span id="L2943" class="LineNr">2943 </span> ] <span id="L2944" class="LineNr">2944 </span> run [ -<span id="L2945" class="LineNr">2945 </span> editor-event-loop screen, console, e +<span id="L2945" class="LineNr">2945 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L2946" class="LineNr">2946 </span> ] <span id="L2947" class="LineNr">2947 </span> <span class="Comment"># screen shows original page again</span> <span id="L2948" class="LineNr">2948 </span> screen-should-contain [ @@ -3017,7 +3017,7 @@ if ('onhashchange' in window) { <span id="L2959" class="LineNr">2959 </span> <span class="muControl">break-unless</span> page-up? <span id="L2960" class="LineNr">2960 </span> old-top:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L2961" class="LineNr">2961 </span><span class="Constant"> <move-cursor-begin></span> -<span id="L2962" class="LineNr">2962 </span> editor <span class="Special"><-</span> page-up editor, screen-height +<span id="L2962" class="LineNr">2962 </span> editor <span class="Special"><-</span> page-up editor, <a href='081print.mu.html#L594'>screen-height</a> <span id="L2963" class="LineNr">2963 </span> undo-coalesce-tag:num <span class="Special"><-</span> copy <span class="Constant">0/never</span> <span id="L2964" class="LineNr">2964 </span><span class="Constant"> <move-cursor-end></span> <span id="L2965" class="LineNr">2965 </span> top-of-screen:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> @@ -3032,7 +3032,7 @@ if ('onhashchange' in window) { <span id="L2974" class="LineNr">2974 </span> <span class="muControl">break-unless</span> page-up? <span id="L2975" class="LineNr">2975 </span> old-top:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L2976" class="LineNr">2976 </span><span class="Constant"> <move-cursor-begin></span> -<span id="L2977" class="LineNr">2977 </span> editor <span class="Special"><-</span> page-up editor, screen-height +<span id="L2977" class="LineNr">2977 </span> editor <span class="Special"><-</span> page-up editor, <a href='081print.mu.html#L594'>screen-height</a> <span id="L2978" class="LineNr">2978 </span> undo-coalesce-tag:num <span class="Special"><-</span> copy <span class="Constant">0/never</span> <span id="L2979" class="LineNr">2979 </span><span class="Constant"> <move-cursor-end></span> <span id="L2980" class="LineNr">2980 </span> top-of-screen:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> @@ -3042,18 +3042,18 @@ if ('onhashchange' in window) { <span id="L2984" class="LineNr">2984 </span> <span class="Delimiter">}</span> <span id="L2985" class="LineNr">2985 </span>] <span id="L2986" class="LineNr">2986 </span> -<span id="L2987" class="LineNr">2987 </span><span class="muRecipe">def</span> page-up editor:&:editor, screen-height:num<span class="muRecipe"> -> </span>editor:&:editor [ +<span id="L2987" class="LineNr">2987 </span><span class="muRecipe">def</span> page-up editor:&:editor, <a href='081print.mu.html#L594'>screen-height</a>:num<span class="muRecipe"> -> </span>editor:&:editor [ <span id="L2988" class="LineNr">2988 </span> <span class="Constant">local-scope</span> <span id="L2989" class="LineNr">2989 </span> <span class="Constant">load-ingredients</span> -<span id="L2990" class="LineNr">2990 </span> max:num <span class="Special"><-</span> subtract screen-height, <span class="Constant">1/menu-bar</span>, <span class="Constant">1/overlapping-line</span> +<span id="L2990" class="LineNr">2990 </span> max:num <span class="Special"><-</span> subtract <a href='081print.mu.html#L594'>screen-height</a>, <span class="Constant">1/menu-bar</span>, <span class="Constant">1/overlapping-line</span> <span id="L2991" class="LineNr">2991 </span> count:num <span class="Special"><-</span> copy<span class="Constant"> 0</span> <span id="L2992" class="LineNr">2992 </span> top-of-screen:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L2993" class="LineNr">2993 </span> <span class="Delimiter">{</span> <span id="L2994" class="LineNr">2994 </span> done?:bool <span class="Special"><-</span> greater-or-equal count, max <span id="L2995" class="LineNr">2995 </span> <span class="muControl">break-if</span> done? -<span id="L2996" class="LineNr">2996 </span> prev:&:duplex-list:char <span class="Special"><-</span> before-previous-line top-of-screen, editor -<span id="L2997" class="LineNr">2997 </span> <span class="muControl">break-unless</span> prev -<span id="L2998" class="LineNr">2998 </span> top-of-screen <span class="Special"><-</span> copy prev +<span id="L2996" class="LineNr">2996 </span> <a href='065duplex_list.mu.html#L36'>prev</a>:&:duplex-list:char <span class="Special"><-</span> before-previous-line top-of-screen, editor +<span id="L2997" class="LineNr">2997 </span> <span class="muControl">break-unless</span> <a href='065duplex_list.mu.html#L36'>prev</a> +<span id="L2998" class="LineNr">2998 </span> top-of-screen <span class="Special"><-</span> copy <a href='065duplex_list.mu.html#L36'>prev</a> <span id="L2999" class="LineNr">2999 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">top-of-screen:offset</span>, top-of-screen <span id="L3000" class="LineNr">3000 </span> count <span class="Special"><-</span> add count,<span class="Constant"> 1</span> <span id="L3001" class="LineNr">3001 </span> <span class="muControl">loop</span> @@ -3074,7 +3074,7 @@ if ('onhashchange' in window) { <span id="L3016" class="LineNr">3016 </span><span class="Constant">g</span> <span id="L3017" class="LineNr">3017 </span><span class="Constant">h]</span> <span id="L3018" class="LineNr">3018 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">10/right</span> -<span id="L3019" class="LineNr">3019 </span> editor-render screen, e +<span id="L3019" class="LineNr">3019 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L3020" class="LineNr">3020 </span> screen-should-contain [ <span id="L3021" class="LineNr">3021 </span> <span class="Constant"> . .</span> <span id="L3022" class="LineNr">3022 </span> <span class="Constant"> .a .</span> @@ -3087,7 +3087,7 @@ if ('onhashchange' in window) { <span id="L3029" class="LineNr">3029 </span> press page-down <span id="L3030" class="LineNr">3030 </span> ] <span id="L3031" class="LineNr">3031 </span> run [ -<span id="L3032" class="LineNr">3032 </span> editor-event-loop screen, console, e +<span id="L3032" class="LineNr">3032 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L3033" class="LineNr">3033 </span> ] <span id="L3034" class="LineNr">3034 </span> <span class="Comment"># screen shows third page</span> <span id="L3035" class="LineNr">3035 </span> screen-should-contain [ @@ -3101,7 +3101,7 @@ if ('onhashchange' in window) { <span id="L3043" class="LineNr">3043 </span> press page-up <span id="L3044" class="LineNr">3044 </span> ] <span id="L3045" class="LineNr">3045 </span> run [ -<span id="L3046" class="LineNr">3046 </span> editor-event-loop screen, console, e +<span id="L3046" class="LineNr">3046 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L3047" class="LineNr">3047 </span> ] <span id="L3048" class="LineNr">3048 </span> <span class="Comment"># screen shows second page</span> <span id="L3049" class="LineNr">3049 </span> screen-should-contain [ @@ -3115,7 +3115,7 @@ if ('onhashchange' in window) { <span id="L3057" class="LineNr">3057 </span> press page-up <span id="L3058" class="LineNr">3058 </span> ] <span id="L3059" class="LineNr">3059 </span> run [ -<span id="L3060" class="LineNr">3060 </span> editor-event-loop screen, console, e +<span id="L3060" class="LineNr">3060 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L3061" class="LineNr">3061 </span> ] <span id="L3062" class="LineNr">3062 </span> <span class="Comment"># screen shows original page again</span> <span id="L3063" class="LineNr">3063 </span> screen-should-contain [ @@ -3143,7 +3143,7 @@ if ('onhashchange' in window) { <span id="L3085" class="LineNr">3085 </span><span class="Constant">o]</span> <span id="L3086" class="LineNr">3086 </span> <span class="Comment"># editor screen triggers wrap of last line</span> <span id="L3087" class="LineNr">3087 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">4/right</span> -<span id="L3088" class="LineNr">3088 </span> editor-render screen, e +<span id="L3088" class="LineNr">3088 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L3089" class="LineNr">3089 </span> <span class="Comment"># some part of last line is not displayed</span> <span id="L3090" class="LineNr">3090 </span> screen-should-contain [ <span id="L3091" class="LineNr">3091 </span> <span class="Constant"> . .</span> @@ -3160,7 +3160,7 @@ if ('onhashchange' in window) { <span id="L3102" class="LineNr">3102 </span> press down-arrow <span id="L3103" class="LineNr">3103 </span> ] <span id="L3104" class="LineNr">3104 </span> run [ -<span id="L3105" class="LineNr">3105 </span> editor-event-loop screen, console, e +<span id="L3105" class="LineNr">3105 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L3106" class="LineNr">3106 </span> ] <span id="L3107" class="LineNr">3107 </span> <span class="Comment"># screen shows entire wrapped line</span> <span id="L3108" class="LineNr">3108 </span> screen-should-contain [ @@ -3176,7 +3176,7 @@ if ('onhashchange' in window) { <span id="L3118" class="LineNr">3118 </span> press page-up <span id="L3119" class="LineNr">3119 </span> ] <span id="L3120" class="LineNr">3120 </span> run [ -<span id="L3121" class="LineNr">3121 </span> editor-event-loop screen, console, e +<span id="L3121" class="LineNr">3121 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L3122" class="LineNr">3122 </span> ] <span id="L3123" class="LineNr">3123 </span> <span class="Comment"># screen resets</span> <span id="L3124" class="LineNr">3124 </span> screen-should-contain [ @@ -3198,7 +3198,7 @@ if ('onhashchange' in window) { <span id="L3140" class="LineNr">3140 </span> s:text <span class="Special"><-</span> new <span class="Constant">[a</span> <span id="L3141" class="LineNr">3141 </span><span class="Constant">bcdefgh]</span> <span id="L3142" class="LineNr">3142 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">4/right</span> -<span id="L3143" class="LineNr">3143 </span> editor-render screen, e +<span id="L3143" class="LineNr">3143 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L3144" class="LineNr">3144 </span> <span class="Comment"># some part of last line is not displayed</span> <span id="L3145" class="LineNr">3145 </span> screen-should-contain [ <span id="L3146" class="LineNr">3146 </span> <span class="Constant"> . .</span> @@ -3211,7 +3211,7 @@ if ('onhashchange' in window) { <span id="L3153" class="LineNr">3153 </span> press page-down <span id="L3154" class="LineNr">3154 </span> ] <span id="L3155" class="LineNr">3155 </span> run [ -<span id="L3156" class="LineNr">3156 </span> editor-event-loop screen, console, e +<span id="L3156" class="LineNr">3156 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L3157" class="LineNr">3157 </span> ] <span id="L3158" class="LineNr">3158 </span> <span class="Comment"># screen shows entire wrapped line</span> <span id="L3159" class="LineNr">3159 </span> screen-should-contain [ @@ -3225,7 +3225,7 @@ if ('onhashchange' in window) { <span id="L3167" class="LineNr">3167 </span> press page-up <span id="L3168" class="LineNr">3168 </span> ] <span id="L3169" class="LineNr">3169 </span> run [ -<span id="L3170" class="LineNr">3170 </span> editor-event-loop screen, console, e +<span id="L3170" class="LineNr">3170 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L3171" class="LineNr">3171 </span> ] <span id="L3172" class="LineNr">3172 </span> <span class="Comment"># screen resets</span> <span id="L3173" class="LineNr">3173 </span> screen-should-contain [ @@ -3250,7 +3250,7 @@ if ('onhashchange' in window) { <span id="L3192" class="LineNr">3192 </span><span class="Constant">hxx</span> <span id="L3193" class="LineNr">3193 </span><span class="Constant">]</span> <span id="L3194" class="LineNr">3194 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">4/right</span> -<span id="L3195" class="LineNr">3195 </span> editor-render screen, e +<span id="L3195" class="LineNr">3195 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L3196" class="LineNr">3196 </span> screen-should-contain [ <span id="L3197" class="LineNr">3197 </span> <span class="Constant"> . .</span> <span id="L3198" class="LineNr">3198 </span> <span class="Constant"> .axx .</span> @@ -3261,7 +3261,7 @@ if ('onhashchange' in window) { <span id="L3203" class="LineNr">3203 </span> press page-down <span id="L3204" class="LineNr">3204 </span> ] <span id="L3205" class="LineNr">3205 </span> run [ -<span id="L3206" class="LineNr">3206 </span> editor-event-loop screen, console, e +<span id="L3206" class="LineNr">3206 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L3207" class="LineNr">3207 </span> ] <span id="L3208" class="LineNr">3208 </span> screen-should-contain [ <span id="L3209" class="LineNr">3209 </span> <span class="Constant"> . .</span> @@ -3273,7 +3273,7 @@ if ('onhashchange' in window) { <span id="L3215" class="LineNr">3215 </span> press page-down <span id="L3216" class="LineNr">3216 </span> ] <span id="L3217" class="LineNr">3217 </span> run [ -<span id="L3218" class="LineNr">3218 </span> editor-event-loop screen, console, e +<span id="L3218" class="LineNr">3218 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L3219" class="LineNr">3219 </span> ] <span id="L3220" class="LineNr">3220 </span> screen-should-contain [ <span id="L3221" class="LineNr">3221 </span> <span class="Constant"> . .</span> @@ -3286,7 +3286,7 @@ if ('onhashchange' in window) { <span id="L3228" class="LineNr">3228 </span> press page-up <span id="L3229" class="LineNr">3229 </span> ] <span id="L3230" class="LineNr">3230 </span> run [ -<span id="L3231" class="LineNr">3231 </span> editor-event-loop screen, console, e +<span id="L3231" class="LineNr">3231 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L3232" class="LineNr">3232 </span> ] <span id="L3233" class="LineNr">3233 </span> screen-should-contain [ <span id="L3234" class="LineNr">3234 </span> <span class="Constant"> . .</span> @@ -3310,7 +3310,7 @@ if ('onhashchange' in window) { <span id="L3252" class="LineNr">3252 </span>gxy <span id="L3253" class="LineNr">3253 </span>] <span id="L3254" class="LineNr">3254 </span> e:&:editor <span class="Special"><-</span> new-editor s, <span class="Constant">0/left</span>, <span class="Constant">4/right</span> -<span id="L3255" class="LineNr">3255 </span> editor-render screen, e +<span id="L3255" class="LineNr">3255 </span> editor-render <a href='081print.mu.html#L4'>screen</a>, e <span id="L3256" class="LineNr">3256 </span> screen-should-contain [ <span id="L3257" class="LineNr">3257 </span> <span class="Constant"> . .</span> <span id="L3258" class="LineNr">3258 </span> <span class="Constant"> .axy .</span> @@ -3321,7 +3321,7 @@ if ('onhashchange' in window) { <span id="L3263" class="LineNr">3263 </span> press page-down <span id="L3264" class="LineNr">3264 </span> ] <span id="L3265" class="LineNr">3265 </span> run [ -<span id="L3266" class="LineNr">3266 </span> editor-event-loop screen, console, e +<span id="L3266" class="LineNr">3266 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L3267" class="LineNr">3267 </span> ] <span id="L3268" class="LineNr">3268 </span> screen-should-contain [ <span id="L3269" class="LineNr">3269 </span> <span class="Constant"> . .</span> @@ -3333,7 +3333,7 @@ if ('onhashchange' in window) { <span id="L3275" class="LineNr">3275 </span> press page-down <span id="L3276" class="LineNr">3276 </span> ] <span id="L3277" class="LineNr">3277 </span> run [ -<span id="L3278" class="LineNr">3278 </span> editor-event-loop screen, console, e +<span id="L3278" class="LineNr">3278 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L3279" class="LineNr">3279 </span> ] <span id="L3280" class="LineNr">3280 </span> screen-should-contain [ <span id="L3281" class="LineNr">3281 </span> <span class="Constant"> . .</span> @@ -3346,7 +3346,7 @@ if ('onhashchange' in window) { <span id="L3288" class="LineNr">3288 </span> press page-up <span id="L3289" class="LineNr">3289 </span> ] <span id="L3290" class="LineNr">3290 </span> run [ -<span id="L3291" class="LineNr">3291 </span> editor-event-loop screen, console, e +<span id="L3291" class="LineNr">3291 </span> editor-event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, e <span id="L3292" class="LineNr">3292 </span> ] <span id="L3293" class="LineNr">3293 </span> screen-should-contain [ <span id="L3294" class="LineNr">3294 </span> <span class="Constant"> . .</span> |