diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2017-04-18 11:33:33 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2017-04-18 11:33:33 -0700 |
commit | 6c52e24e2996a77aa6297b26159003d503aef8a0 (patch) | |
tree | 7546851659eca4b166e42c4a5f236caf0a2281f1 /html/edit | |
parent | bd58d18a2308ae5b53a6f5df1e67203739396d8f (diff) | |
download | mu-6c52e24e2996a77aa6297b26159003d503aef8a0.tar.gz |
3830 - crosslink shape-shifting containers in html
Diffstat (limited to 'html/edit')
-rw-r--r-- | html/edit/001-editor.mu.html | 18 | ||||
-rw-r--r-- | html/edit/002-typing.mu.html | 24 | ||||
-rw-r--r-- | html/edit/003-shortcuts.mu.html | 134 | ||||
-rw-r--r-- | html/edit/004-programming-environment.mu.html | 8 | ||||
-rw-r--r-- | html/edit/005-sandbox.mu.html | 6 | ||||
-rw-r--r-- | html/edit/006-sandbox-copy.mu.html | 4 | ||||
-rw-r--r-- | html/edit/011-errors.mu.html | 4 | ||||
-rw-r--r-- | html/edit/012-editor-undo.mu.html | 144 |
8 files changed, 171 insertions, 171 deletions
diff --git a/html/edit/001-editor.mu.html b/html/edit/001-editor.mu.html index f9282fcc..14307ec2 100644 --- a/html/edit/001-editor.mu.html +++ b/html/edit/001-editor.mu.html @@ -92,11 +92,11 @@ if ('onhashchange' in window) { <span id="L29" class="LineNr"> 29 </span> <span id="L30" class="LineNr"> 30 </span><span class="muData">container</span> editor [ <span id="L31" class="LineNr"> 31 </span> <span class="Comment"># editable text: doubly linked list of characters (head contains a special sentinel)</span> -<span id="L32" class="LineNr"> 32 </span> data:&:duplex-list:char -<span id="L33" class="LineNr"> 33 </span> top-of-screen:&:duplex-list:char -<span id="L34" class="LineNr"> 34 </span> bottom-of-screen:&:duplex-list:char +<span id="L32" class="LineNr"> 32 </span> data:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char +<span id="L33" class="LineNr"> 33 </span> top-of-screen:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char +<span id="L34" class="LineNr"> 34 </span> bottom-of-screen:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span id="L35" class="LineNr"> 35 </span> <span class="Comment"># location before cursor inside data</span> -<span id="L36" class="LineNr"> 36 </span> before-cursor:&:duplex-list:char +<span id="L36" class="LineNr"> 36 </span> before-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span id="L37" class="LineNr"> 37 </span> <span id="L38" class="LineNr"> 38 </span> <span class="Comment"># raw bounds of display area on screen</span> <span id="L39" class="LineNr"> 39 </span> <span class="Comment"># always displays from row 1 (leaving row 0 for a menu) and at most until bottom of screen</span> @@ -123,7 +123,7 @@ if ('onhashchange' in window) { <span id="L60" class="LineNr"> 60 </span> *result <span class="Special"><-</span> put *result, <span class="Constant">cursor-row:offset</span>, <span class="Constant">1/top</span> <span id="L61" class="LineNr"> 61 </span> *result <span class="Special"><-</span> put *result, <span class="Constant">cursor-column:offset</span>, left <span id="L62" class="LineNr"> 62 </span> <span class="Comment"># initialize empty contents</span> -<span id="L63" class="LineNr"> 63 </span> init:&:duplex-list:char <span class="Special"><-</span> push <span class="Constant">167/§</span>, <span class="Constant">0/tail</span> +<span id="L63" class="LineNr"> 63 </span> init:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> push <span class="Constant">167/§</span>, <span class="Constant">0/tail</span> <span id="L64" class="LineNr"> 64 </span> *result <span class="Special"><-</span> put *result, <span class="Constant">data:offset</span>, init <span id="L65" class="LineNr"> 65 </span> *result <span class="Special"><-</span> put *result, <span class="Constant">top-of-screen:offset</span>, init <span id="L66" class="LineNr"> 66 </span> *result <span class="Special"><-</span> put *result, <span class="Constant">before-cursor:offset</span>, init @@ -140,7 +140,7 @@ if ('onhashchange' in window) { <span id="L77" class="LineNr"> 77 </span> <span class="muControl">return-unless</span> len <span id="L78" class="LineNr"> 78 </span> idx:num <span class="Special"><-</span> copy<span class="Constant"> 0</span> <span id="L79" class="LineNr"> 79 </span> <span class="Comment"># now we can start appending the rest, character by character</span> -<span id="L80" class="LineNr"> 80 </span> curr:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">data:offset</span> +<span id="L80" class="LineNr"> 80 </span> curr:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">data:offset</span> <span id="L81" class="LineNr"> 81 </span> <span class="Delimiter">{</span> <span id="L82" class="LineNr"> 82 </span> <span class="Conceal">¦</span> done?:bool <span class="Special"><-</span> greater-or-equal idx, len <span id="L83" class="LineNr"> 83 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> done? @@ -189,8 +189,8 @@ if ('onhashchange' in window) { <span id="L126" class="LineNr">126 </span> <a href='../081print.mu.html#L587'>screen-height</a>:num <span class="Special"><-</span> <a href='../081print.mu.html#L587'>screen-height</a> <a href='../081print.mu.html#L4'>screen</a> <span id="L127" class="LineNr">127 </span> right:num <span class="Special"><-</span> get *editor, <span class="Constant">right:offset</span> <span id="L128" class="LineNr">128 </span> <span class="Comment"># traversing editor</span> -<span id="L129" class="LineNr">129 </span> curr:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> -<span id="L130" class="LineNr">130 </span> <a href='../065duplex_list.mu.html#L36'>prev</a>:&:duplex-list:char <span class="Special"><-</span> copy curr <span class="Comment"># just in case curr becomes null and we can't compute prev</span> +<span id="L129" class="LineNr">129 </span> curr:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> +<span id="L130" class="LineNr">130 </span> <a href='../065duplex_list.mu.html#L36'>prev</a>:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> copy curr <span class="Comment"># just in case curr becomes null and we can't compute prev</span> <span id="L131" class="LineNr">131 </span> curr <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L29'>next</a> curr <span id="L132" class="LineNr">132 </span> <span class="Comment"># traversing screen</span> <span id="L133" class="LineNr">133 </span> color:num <span class="Special"><-</span> copy <span class="Constant">7/white</span> @@ -198,7 +198,7 @@ if ('onhashchange' in window) { <span id="L135" class="LineNr">135 </span> column:num <span class="Special"><-</span> copy left <span id="L136" class="LineNr">136 </span> cursor-row:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-row:offset</span> <span id="L137" class="LineNr">137 </span> cursor-column:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-column:offset</span> -<span id="L138" class="LineNr">138 </span> before-cursor:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> +<span id="L138" class="LineNr">138 </span> before-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> <span id="L139" class="LineNr">139 </span> <a href='../081print.mu.html#L4'>screen</a> <span class="Special"><-</span> <a href='../081print.mu.html#L435'>move-cursor</a> <a href='../081print.mu.html#L4'>screen</a>, row, column <span id="L140" class="LineNr">140 </span> <span class="Delimiter">{</span> <span id="L141" class="LineNr">141 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> +next-character</span> diff --git a/html/edit/002-typing.mu.html b/html/edit/002-typing.mu.html index 3b48c3cc..ad249e5c 100644 --- a/html/edit/002-typing.mu.html +++ b/html/edit/002-typing.mu.html @@ -141,8 +141,8 @@ if ('onhashchange' in window) { <span id="L78" class="LineNr"> 78 </span> right:num <span class="Special"><-</span> get *editor, <span class="Constant">right:offset</span> <span id="L79" class="LineNr"> 79 </span> <a href='../081print.mu.html#L587'>screen-height</a>:num <span class="Special"><-</span> <a href='../081print.mu.html#L587'>screen-height</a> <a href='../081print.mu.html#L4'>screen</a> <span id="L80" class="LineNr"> 80 </span> <span class="Comment"># count newlines until screen row</span> -<span id="L81" class="LineNr"> 81 </span> curr:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> -<span id="L82" class="LineNr"> 82 </span> <a href='../065duplex_list.mu.html#L36'>prev</a>:&:duplex-list:char <span class="Special"><-</span> copy curr <span class="Comment"># just in case curr becomes null and we can't compute prev</span> +<span id="L81" class="LineNr"> 81 </span> curr:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> +<span id="L82" class="LineNr"> 82 </span> <a href='../065duplex_list.mu.html#L36'>prev</a>:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> copy curr <span class="Comment"># just in case curr becomes null and we can't compute prev</span> <span id="L83" class="LineNr"> 83 </span> curr <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L29'>next</a> curr <span id="L84" class="LineNr"> 84 </span> row:num <span class="Special"><-</span> copy <span class="Constant">1/top</span> <span id="L85" class="LineNr"> 85 </span> column:num <span class="Special"><-</span> copy left @@ -150,7 +150,7 @@ if ('onhashchange' in window) { <span id="L87" class="LineNr"> 87 </span> cursor-row:num <span class="Special"><-</span> copy target-row <span id="L88" class="LineNr"> 88 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-column:offset</span>, target-column <span id="L89" class="LineNr"> 89 </span> cursor-column:num <span class="Special"><-</span> copy target-column -<span id="L90" class="LineNr"> 90 </span> before-cursor:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> +<span id="L90" class="LineNr"> 90 </span> before-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> <span id="L91" class="LineNr"> 91 </span> <span class="Delimiter">{</span> <span id="L92" class="LineNr"> 92 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> +next-character</span> <span id="L93" class="LineNr"> 93 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> curr @@ -232,7 +232,7 @@ if ('onhashchange' in window) { <span id="L169" class="LineNr"> 169 </span> <a href='../081print.mu.html#L587'>screen-height</a>:num <span class="Special"><-</span> <a href='../081print.mu.html#L587'>screen-height</a> <a href='../081print.mu.html#L4'>screen</a> <span id="L170" class="LineNr"> 170 </span> left:num <span class="Special"><-</span> get *editor, <span class="Constant">left:offset</span> <span id="L171" class="LineNr"> 171 </span> right:num <span class="Special"><-</span> get *editor, <span class="Constant">right:offset</span> -<span id="L172" class="LineNr"> 172 </span> before-cursor:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> +<span id="L172" class="LineNr"> 172 </span> before-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> <span id="L173" class="LineNr"> 173 </span> cursor-row:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-row:offset</span> <span id="L174" class="LineNr"> 174 </span> cursor-column:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-column:offset</span> <span id="L175" class="LineNr"> 175 </span> save-row:num <span class="Special"><-</span> copy cursor-row @@ -264,7 +264,7 @@ if ('onhashchange' in window) { <span id="L201" class="LineNr"> 201 </span><span class="muRecipe">def</span> <a href='002-typing.mu.html#L201'>insert-at-cursor</a> editor:&:editor, c:char, <a href='../081print.mu.html#L4'>screen</a>:&:<a href='../081print.mu.html#L4'>screen</a><span class="muRecipe"> -> </span>go-render?:bool, editor:&:editor, <a href='../081print.mu.html#L4'>screen</a>:&:<a href='../081print.mu.html#L4'>screen</a> [ <span id="L202" class="LineNr"> 202 </span> <span class="Constant">local-scope</span> <span id="L203" class="LineNr"> 203 </span> <span class="Constant">load-ingredients</span> -<span id="L204" class="LineNr"> 204 </span> before-cursor:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> +<span id="L204" class="LineNr"> 204 </span> before-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> <span id="L205" class="LineNr"> 205 </span> insert c, before-cursor <span id="L206" class="LineNr"> 206 </span> before-cursor <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L29'>next</a> before-cursor <span id="L207" class="LineNr"> 207 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">before-cursor:offset</span>, before-cursor @@ -281,7 +281,7 @@ if ('onhashchange' in window) { <span id="L218" class="LineNr"> 218 </span> <span class="Comment"># but mostly we'll just move the cursor right</span> <span id="L219" class="LineNr"> 219 </span> cursor-column <span class="Special"><-</span> add cursor-column,<span class="Constant"> 1</span> <span id="L220" class="LineNr"> 220 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-column:offset</span>, cursor-column -<span id="L221" class="LineNr"> 221 </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="L221" class="LineNr"> 221 </span> <a href='../065duplex_list.mu.html#L29'>next</a>:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L29'>next</a> before-cursor <span id="L222" class="LineNr"> 222 </span> <span class="Delimiter">{</span> <span id="L223" class="LineNr"> 223 </span> <span class="Conceal">¦</span> <span class="Comment"># at end of all text? no need to scroll? just print the character and leave</span> <span id="L224" class="LineNr"> 224 </span> <span class="Conceal">¦</span> at-end?:bool <span class="Special"><-</span> equal <a href='../065duplex_list.mu.html#L29'>next</a>, <span class="Constant">0/null</span> @@ -300,7 +300,7 @@ if ('onhashchange' in window) { <span id="L237" class="LineNr"> 237 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> <a href='../065duplex_list.mu.html#L29'>next</a> <span id="L238" class="LineNr"> 238 </span> <span class="Conceal">¦</span> at-right?:bool <span class="Special"><-</span> greater-or-equal cursor-column, <a href='../081print.mu.html#L574'>screen-width</a> <span id="L239" class="LineNr"> 239 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> at-right? -<span id="L240" class="LineNr"> 240 </span> <span class="Conceal">¦</span> curr:&:duplex-list:char <span class="Special"><-</span> copy before-cursor +<span id="L240" class="LineNr"> 240 </span> <span class="Conceal">¦</span> curr:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> copy before-cursor <span id="L241" class="LineNr"> 241 </span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L435'>move-cursor</a> <a href='../081print.mu.html#L4'>screen</a>, save-row, save-column <span id="L242" class="LineNr"> 242 </span> <span class="Conceal">¦</span> curr-column:num <span class="Special"><-</span> copy save-column <span id="L243" class="LineNr"> 243 </span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> @@ -760,7 +760,7 @@ if ('onhashchange' in window) { <span id="L697" class="LineNr"> 697 </span> <span class="Conceal">¦</span> before-wrap-column:num <span class="Special"><-</span> subtract wrap-column,<span class="Constant"> 1</span> <span id="L698" class="LineNr"> 698 </span> <span class="Conceal">¦</span> at-wrap?:bool <span class="Special"><-</span> greater-or-equal cursor-column, wrap-column <span id="L699" class="LineNr"> 699 </span> <span class="Conceal">¦</span> just-before-wrap?:bool <span class="Special"><-</span> greater-or-equal cursor-column, before-wrap-column -<span id="L700" class="LineNr"> 700 </span> <span class="Conceal">¦</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="L700" class="LineNr"> 700 </span> <span class="Conceal">¦</span> <a href='../065duplex_list.mu.html#L29'>next</a>:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L29'>next</a> before-cursor <span id="L701" class="LineNr"> 701 </span> <span class="Conceal">¦</span> <span class="Comment"># at end of line? next == 0 || next.value == 10/newline</span> <span id="L702" class="LineNr"> 702 </span> <span class="Conceal">¦</span> at-end-of-line?:bool <span class="Special"><-</span> equal <a href='../065duplex_list.mu.html#L29'>next</a>,<span class="Constant"> 0</span> <span id="L703" class="LineNr"> 703 </span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> @@ -929,7 +929,7 @@ if ('onhashchange' in window) { <span id="L866" class="LineNr"> 866 </span> <span class="Constant">load-ingredients</span> <span id="L867" class="LineNr"> 867 </span> cursor-row:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-row:offset</span> <span id="L868" class="LineNr"> 868 </span> cursor-column:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-column:offset</span> -<span id="L869" class="LineNr"> 869 </span> before-cursor:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> +<span id="L869" class="LineNr"> 869 </span> before-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> <span id="L870" class="LineNr"> 870 </span> left:num <span class="Special"><-</span> get *editor, <span class="Constant">left:offset</span> <span id="L871" class="LineNr"> 871 </span> right:num <span class="Special"><-</span> get *editor, <span class="Constant">right:offset</span> <span id="L872" class="LineNr"> 872 </span> <a href='../081print.mu.html#L587'>screen-height</a>:num <span class="Special"><-</span> <a href='../081print.mu.html#L587'>screen-height</a> <a href='../081print.mu.html#L4'>screen</a> @@ -952,8 +952,8 @@ if ('onhashchange' in window) { <span id="L889" class="LineNr"> 889 </span> <span class="Comment"># indent if necessary</span> <span id="L890" class="LineNr"> 890 </span> indent?:bool <span class="Special"><-</span> get *editor, <span class="Constant">indent?:offset</span> <span id="L891" class="LineNr"> 891 </span> <span class="muControl">return-unless</span> indent? -<span id="L892" class="LineNr"> 892 </span> d:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">data:offset</span> -<span id="L893" class="LineNr"> 893 </span> end-of-previous-line:&:duplex-list:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L36'>prev</a> before-cursor +<span id="L892" class="LineNr"> 892 </span> d:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">data:offset</span> +<span id="L893" class="LineNr"> 893 </span> end-of-previous-line:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L36'>prev</a> before-cursor <span id="L894" class="LineNr"> 894 </span> indent:num <span class="Special"><-</span> <a href='002-typing.mu.html#L907'>line-indent</a> end-of-previous-line, d <span id="L895" class="LineNr"> 895 </span> i:num <span class="Special"><-</span> copy<span class="Constant"> 0</span> <span id="L896" class="LineNr"> 896 </span> <span class="Delimiter">{</span> @@ -967,7 +967,7 @@ if ('onhashchange' in window) { <span id="L904" class="LineNr"> 904 </span> <span id="L905" class="LineNr"> 905 </span><span class="Comment"># takes a pointer 'curr' into the doubly-linked list and its sentinel, counts</span> <span id="L906" class="LineNr"> 906 </span><span class="Comment"># the number of spaces at the start of the line containing 'curr'.</span> -<span id="L907" class="LineNr"> 907 </span><span class="muRecipe">def</span> <a href='002-typing.mu.html#L907'>line-indent</a> curr:&:duplex-list:char, start:&:duplex-list:char<span class="muRecipe"> -> </span>result:num [ +<span id="L907" class="LineNr"> 907 </span><span class="muRecipe">def</span> <a href='002-typing.mu.html#L907'>line-indent</a> curr:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char, start:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char<span class="muRecipe"> -> </span>result:num [ <span id="L908" class="LineNr"> 908 </span> <span class="Constant">local-scope</span> <span id="L909" class="LineNr"> 909 </span> <span class="Constant">load-ingredients</span> <span id="L910" class="LineNr"> 910 </span> result:num <span class="Special"><-</span> copy<span class="Constant"> 0</span> diff --git a/html/edit/003-shortcuts.mu.html b/html/edit/003-shortcuts.mu.html index c1fd5eca..83871010 100644 --- a/html/edit/003-shortcuts.mu.html +++ b/html/edit/003-shortcuts.mu.html @@ -133,7 +133,7 @@ if ('onhashchange' in window) { <span id="L71" class="LineNr"> 71 </span> <span class="Conceal">¦</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="Conceal">¦</span> <span class="muControl">break-unless</span> delete-previous-character? <span id="L73" class="LineNr"> 73 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <a href='003-shortcuts.mu.html#L73'><backspace-character-begin></a></span> -<span id="L74" class="LineNr"> 74 </span> <span class="Conceal">¦</span> go-render?:bool, backspaced-cell:&:duplex-list:char <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L83'>delete-before-cursor</a> editor, <a href='../081print.mu.html#L4'>screen</a> +<span id="L74" class="LineNr"> 74 </span> <span class="Conceal">¦</span> go-render?:bool, backspaced-cell:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L83'>delete-before-cursor</a> editor, <a href='../081print.mu.html#L4'>screen</a> <span id="L75" class="LineNr"> 75 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <a href='003-shortcuts.mu.html#L75'><backspace-character-end></a></span> <span id="L76" class="LineNr"> 76 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span id="L77" class="LineNr"> 77 </span> <span class="Delimiter">}</span> @@ -142,18 +142,18 @@ 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> <a href='003-shortcuts.mu.html#L83'>delete-before-cursor</a> 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="L83" class="LineNr"> 83 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L83'>delete-before-cursor</a> 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:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>: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="L86" class="LineNr"> 86 </span> before-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> +<span id="L87" class="LineNr"> 87 </span> data:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">data:offset</span> <span id="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> <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="L89" class="LineNr"> 89 </span> <a href='../065duplex_list.mu.html#L36'>prev</a>:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>: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> <a href='003-shortcuts.mu.html#L130'>move-cursor-coordinates-left</a> editor -<span id="L94" class="LineNr"> 94 </span> backspaced-cell:&:duplex-list:char <span class="Special"><-</span> copy before-cursor +<span id="L94" class="LineNr"> 94 </span> backspaced-cell:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>: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 <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 @@ -166,7 +166,7 @@ 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> <a href='../065duplex_list.mu.html#L29'>next</a> before-cursor +<span id="L107" class="LineNr"> 107 </span> curr:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>: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#L435'>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> @@ -193,7 +193,7 @@ if ('onhashchange' in window) { <span id="L131" class="LineNr"> 131 </span> <span class="Constant">local-scope</span> <span id="L132" class="LineNr"> 132 </span> <span class="Constant">load-ingredients</span> <span id="L133" class="LineNr"> 133 </span> go-render?:bool <span class="Special"><-</span> copy <span class="Constant">0/false</span> -<span id="L134" class="LineNr"> 134 </span> before-cursor:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> +<span id="L134" class="LineNr"> 134 </span> before-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> <span id="L135" class="LineNr"> 135 </span> cursor-row:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-row:offset</span> <span id="L136" class="LineNr"> 136 </span> cursor-column:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-column:offset</span> <span id="L137" class="LineNr"> 137 </span> left:num <span class="Special"><-</span> get *editor, <span class="Constant">left:offset</span> @@ -225,7 +225,7 @@ if ('onhashchange' in window) { <span id="L163" class="LineNr"> 163 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> previous-character-is-newline? <span id="L164" class="LineNr"> 164 </span> <span class="Conceal">¦</span> <span class="Comment"># compute length of previous line</span> <span id="L165" class="LineNr"> 165 </span> <span class="Conceal">¦</span> trace<span class="Constant"> 10</span>, <span class="Constant">[app]</span>, <span class="Constant">[switching to previous line]</span> -<span id="L166" class="LineNr"> 166 </span> <span class="Conceal">¦</span> d:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">data:offset</span> +<span id="L166" class="LineNr"> 166 </span> <span class="Conceal">¦</span> d:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">data:offset</span> <span id="L167" class="LineNr"> 167 </span> <span class="Conceal">¦</span> end-of-line:num <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L193'>previous-line-length</a> before-cursor, d <span id="L168" class="LineNr"> 168 </span> <span class="Conceal">¦</span> right:num <span class="Special"><-</span> get *editor, <span class="Constant">right:offset</span> <span id="L169" class="LineNr"> 169 </span> <span class="Conceal">¦</span> width:num <span class="Special"><-</span> subtract right, left @@ -252,7 +252,7 @@ if ('onhashchange' in window) { <span id="L190" class="LineNr"> 190 </span> <span id="L191" class="LineNr"> 191 </span><span class="Comment"># takes a pointer 'curr' into the doubly-linked list and its sentinel, counts</span> <span id="L192" class="LineNr"> 192 </span><span class="Comment"># the length of the previous line before the 'curr' pointer.</span> -<span id="L193" class="LineNr"> 193 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L193'>previous-line-length</a> curr:&:duplex-list:char, start:&:duplex-list:char<span class="muRecipe"> -> </span>result:num [ +<span id="L193" class="LineNr"> 193 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L193'>previous-line-length</a> curr:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char, start:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char<span class="muRecipe"> -> </span>result:num [ <span id="L194" class="LineNr"> 194 </span> <span class="Constant">local-scope</span> <span id="L195" class="LineNr"> 195 </span> <span class="Constant">load-ingredients</span> <span id="L196" class="LineNr"> 196 </span> result:num <span class="Special"><-</span> copy<span class="Constant"> 0</span> @@ -401,25 +401,25 @@ if ('onhashchange' in window) { <span id="L339" class="LineNr"> 339 </span> <span class="Conceal">¦</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="Conceal">¦</span> <span class="muControl">break-unless</span> delete-next-character? <span id="L341" class="LineNr"> 341 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <a href='003-shortcuts.mu.html#L341'><delete-character-begin></a></span> -<span id="L342" class="LineNr"> 342 </span> <span class="Conceal">¦</span> go-render?:bool, deleted-cell:&:duplex-list:char <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L348'>delete-at-cursor</a> editor, <a href='../081print.mu.html#L4'>screen</a> +<span id="L342" class="LineNr"> 342 </span> <span class="Conceal">¦</span> go-render?:bool, deleted-cell:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L348'>delete-at-cursor</a> editor, <a href='../081print.mu.html#L4'>screen</a> <span id="L343" class="LineNr"> 343 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <a href='003-shortcuts.mu.html#L343'><delete-character-end></a></span> <span id="L344" class="LineNr"> 344 </span> <span class="Conceal">¦</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> <a href='003-shortcuts.mu.html#L348'>delete-at-cursor</a> 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="L348" class="LineNr"> 348 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L348'>delete-at-cursor</a> 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:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>: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> <a href='../065duplex_list.mu.html#L29'>next</a> before-cursor +<span id="L351" class="LineNr"> 351 </span> before-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> +<span id="L352" class="LineNr"> 352 </span> data:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">data:offset</span> +<span id="L353" class="LineNr"> 353 </span> deleted-cell:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>: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> <a href='../065duplex_list.mu.html#L29'>next</a> before-cursor <span class="Comment"># refresh after remove above</span> +<span id="L360" class="LineNr"> 360 </span> curr:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>: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> <a href='../081print.mu.html#L4'>screen</a> <span class="Special"><-</span> <a href='../081print.mu.html#L435'>move-cursor</a> <a href='../081print.mu.html#L4'>screen</a>, cursor-row, cursor-column @@ -474,7 +474,7 @@ if ('onhashchange' in window) { <span id="L412" class="LineNr"> 412 </span> <span class="Conceal">¦</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="Conceal">¦</span> <span class="muControl">break-unless</span> move-to-next-character? <span id="L414" class="LineNr"> 414 </span> <span class="Conceal">¦</span> <span class="Comment"># if not at end of text</span> -<span id="L415" class="LineNr"> 415 </span> <span class="Conceal">¦</span> next-cursor:&:duplex-list:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L29'>next</a> before-cursor +<span id="L415" class="LineNr"> 415 </span> <span class="Conceal">¦</span> next-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>: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="Conceal">¦</span> <span class="muControl">break-unless</span> next-cursor <span id="L417" class="LineNr"> 417 </span> <span class="Conceal">¦</span> <span class="Comment"># scan to next character</span> <span id="L418" class="LineNr"> 418 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <move-cursor-begin></span> @@ -491,7 +491,7 @@ if ('onhashchange' in window) { <span id="L429" class="LineNr"> 429 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L429'>move-cursor-coordinates-right</a> editor:&:editor, <a href='../081print.mu.html#L587'>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> +<span id="L432" class="LineNr"> 432 </span> before-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor <span class="Constant">before-cursor:offset</span> <span id="L433" class="LineNr"> 433 </span> cursor-row:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-row:offset</span> <span id="L434" class="LineNr"> 434 </span> cursor-column:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-column:offset</span> <span id="L435" class="LineNr"> 435 </span> left:num <span class="Special"><-</span> get *editor, <span class="Constant">left:offset</span> @@ -519,7 +519,7 @@ if ('onhashchange' in window) { <span id="L457" class="LineNr"> 457 </span> <span class="Conceal">¦</span> at-wrap?:bool <span class="Special"><-</span> equal cursor-column, wrap-column <span id="L458" class="LineNr"> 458 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> at-wrap? <span id="L459" class="LineNr"> 459 </span> <span class="Conceal">¦</span> <span class="Comment"># and if next character isn't newline</span> -<span id="L460" class="LineNr"> 460 </span> <span class="Conceal">¦</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="L460" class="LineNr"> 460 </span> <span class="Conceal">¦</span> <a href='../065duplex_list.mu.html#L29'>next</a>:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>: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="Conceal">¦</span> <span class="muControl">break-unless</span> <a href='../065duplex_list.mu.html#L29'>next</a> <span id="L462" class="LineNr"> 462 </span> <span class="Conceal">¦</span> next-character:char <span class="Special"><-</span> get *next, <span class="Constant">value:offset</span> <span id="L463" class="LineNr"> 463 </span> <span class="Conceal">¦</span> newline?:bool <span class="Special"><-</span> equal next-character, <span class="Constant">10/newline</span> @@ -759,7 +759,7 @@ if ('onhashchange' in window) { <span id="L697" class="LineNr"> 697 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> move-to-previous-character? <span id="L698" class="LineNr"> 698 </span> <span class="Conceal">¦</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="Conceal">¦</span> <span class="Comment"># if not at start of text (before-cursor at § sentinel)</span> -<span id="L700" class="LineNr"> 700 </span> <span class="Conceal">¦</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="L700" class="LineNr"> 700 </span> <span class="Conceal">¦</span> <a href='../065duplex_list.mu.html#L36'>prev</a>:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>: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="Conceal">¦</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"> </span><span class="Conceal">¦</span><span class="Constant"> <move-cursor-begin></span> <span id="L703" class="LineNr"> 703 </span> <span class="Conceal">¦</span> go-render? <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L130'>move-cursor-coordinates-left</a> editor @@ -1041,7 +1041,7 @@ if ('onhashchange' in window) { <span id="L979" class="LineNr"> 979 </span> go-render?:bool <span class="Special"><-</span> copy <span class="Constant">0/false</span> <span id="L980" class="LineNr"> 980 </span> cursor-row:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-row:offset</span> <span id="L981" class="LineNr"> 981 </span> cursor-column:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-column:offset</span> -<span id="L982" class="LineNr"> 982 </span> before-cursor:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> +<span id="L982" class="LineNr"> 982 </span> before-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> <span id="L983" class="LineNr"> 983 </span> left:num <span class="Special"><-</span> get *editor, <span class="Constant">left:offset</span> <span id="L984" class="LineNr"> 984 </span> right:num <span class="Special"><-</span> get *editor, <span class="Constant">right:offset</span> <span id="L985" class="LineNr"> 985 </span> already-at-top?:bool <span class="Special"><-</span> lesser-or-equal cursor-row, <span class="Constant">1/top</span> @@ -1051,13 +1051,13 @@ if ('onhashchange' in window) { <span id="L989" class="LineNr"> 989 </span> <span class="Conceal">¦</span> <span class="Comment"># if not at newline, move to start of line (previous newline)</span> <span id="L990" class="LineNr"> 990 </span> <span class="Conceal">¦</span> <span class="Comment"># then scan back another line</span> <span id="L991" class="LineNr"> 991 </span> <span class="Conceal">¦</span> <span class="Comment"># if either step fails, give up without modifying cursor or coordinates</span> -<span id="L992" class="LineNr"> 992 </span> <span class="Conceal">¦</span> curr:&:duplex-list:char <span class="Special"><-</span> copy before-cursor +<span id="L992" class="LineNr"> 992 </span> <span class="Conceal">¦</span> curr:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> copy before-cursor <span id="L993" class="LineNr"> 993 </span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> -<span id="L994" class="LineNr"> 994 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> old:&:duplex-list:char <span class="Special"><-</span> copy curr +<span id="L994" class="LineNr"> 994 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> old:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> copy curr <span id="L995" class="LineNr"> 995 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> c2:char <span class="Special"><-</span> get *curr, <span class="Constant">value:offset</span> <span id="L996" class="LineNr"> 996 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> at-newline?:bool <span class="Special"><-</span> equal c2, <span class="Constant">10/newline</span> <span id="L997" class="LineNr"> 997 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> at-newline? -<span id="L998" class="LineNr"> 998 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> curr:&:duplex-list:char <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L2367'>before-previous-line</a> curr, editor +<span id="L998" class="LineNr"> 998 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> curr:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L2367'>before-previous-line</a> curr, editor <span id="L999" class="LineNr"> 999 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> no-motion?:bool <span class="Special"><-</span> equal curr, old <span id="L1000" class="LineNr">1000 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">return-if</span> no-motion? <span id="L1001" class="LineNr">1001 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> @@ -1078,7 +1078,7 @@ if ('onhashchange' in window) { <span id="L1016" class="LineNr">1016 </span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> <span id="L1017" class="LineNr">1017 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> done?:bool <span class="Special"><-</span> greater-or-equal cursor-column, target-column <span id="L1018" class="LineNr">1018 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> done? -<span id="L1019" class="LineNr">1019 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> curr:&:duplex-list:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L29'>next</a> before-cursor +<span id="L1019" class="LineNr">1019 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> curr:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>: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="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> curr <span id="L1021" class="LineNr">1021 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> currc:char <span class="Special"><-</span> get *curr, <span class="Constant">value:offset</span> <span id="L1022" class="LineNr">1022 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> at-newline?:bool <span class="Special"><-</span> equal currc, <span class="Constant">10/newline</span> @@ -1271,7 +1271,7 @@ if ('onhashchange' in window) { <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> <span id="L1211" class="LineNr">1211 </span> cursor-column:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-column:offset</span> -<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="L1212" class="LineNr">1212 </span> before-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> <span id="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 <a href='../081print.mu.html#L587'>screen-height</a>,<span class="Constant"> 1</span> @@ -1281,7 +1281,7 @@ if ('onhashchange' in window) { <span id="L1219" class="LineNr">1219 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> already-at-bottom? <span id="L1220" class="LineNr">1220 </span> <span class="Conceal">¦</span> <span class="Comment"># scan to start of next line, then to right column or until end of line</span> <span id="L1221" class="LineNr">1221 </span> <span class="Conceal">¦</span> max:num <span class="Special"><-</span> subtract right, left -<span id="L1222" class="LineNr">1222 </span> <span class="Conceal">¦</span> next-line:&:duplex-list:char <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L1988'>before-start-of-next-line</a> before-cursor, max +<span id="L1222" class="LineNr">1222 </span> <span class="Conceal">¦</span> next-line:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L1988'>before-start-of-next-line</a> before-cursor, max <span id="L1223" class="LineNr">1223 </span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> <span id="L1224" class="LineNr">1224 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Comment"># already at end of buffer? try to scroll up (so we can see more</span> <span id="L1225" class="LineNr">1225 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Comment"># warnings or sandboxes below)</span> @@ -1301,7 +1301,7 @@ if ('onhashchange' in window) { <span id="L1239" class="LineNr">1239 </span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> <span id="L1240" class="LineNr">1240 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> done?:bool <span class="Special"><-</span> greater-or-equal cursor-column, target-column <span id="L1241" class="LineNr">1241 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> done? -<span id="L1242" class="LineNr">1242 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> curr:&:duplex-list:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L29'>next</a> before-cursor +<span id="L1242" class="LineNr">1242 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> curr:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>: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="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> curr <span id="L1244" class="LineNr">1244 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> currc:char <span class="Special"><-</span> get *curr, <span class="Constant">value:offset</span> <span id="L1245" class="LineNr">1245 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> at-newline?:bool <span class="Special"><-</span> equal currc, <span class="Constant">10/newline</span> @@ -1417,8 +1417,8 @@ if ('onhashchange' in window) { <span id="L1355" class="LineNr">1355 </span> cursor-column:num <span class="Special"><-</span> copy left <span id="L1356" class="LineNr">1356 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-column:offset</span>, cursor-column <span id="L1357" class="LineNr">1357 </span> <span class="Comment"># update before-cursor</span> -<span id="L1358" class="LineNr">1358 </span> before-cursor:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> -<span id="L1359" class="LineNr">1359 </span> init:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">data:offset</span> +<span id="L1358" class="LineNr">1358 </span> before-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> +<span id="L1359" class="LineNr">1359 </span> init:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">data:offset</span> <span id="L1360" class="LineNr">1360 </span> <span class="Comment"># while not at start of line, move</span> <span id="L1361" class="LineNr">1361 </span> <span class="Delimiter">{</span> <span id="L1362" class="LineNr">1362 </span> <span class="Conceal">¦</span> at-start-of-text?:bool <span class="Special"><-</span> equal before-cursor, init @@ -1586,11 +1586,11 @@ if ('onhashchange' in window) { <span id="L1524" class="LineNr">1524 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L1524'>move-to-end-of-line</a> editor:&:editor<span class="muRecipe"> -> </span>editor:&:editor [ <span id="L1525" class="LineNr">1525 </span> <span class="Constant">local-scope</span> <span id="L1526" class="LineNr">1526 </span> <span class="Constant">load-ingredients</span> -<span id="L1527" class="LineNr">1527 </span> before-cursor:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> +<span id="L1527" class="LineNr">1527 </span> before-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> <span id="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> <span class="Conceal">¦</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="L1531" class="LineNr">1531 </span> <span class="Conceal">¦</span> <a href='../065duplex_list.mu.html#L29'>next</a>:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>: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="Conceal">¦</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> <span class="Conceal">¦</span> nextc:char <span class="Special"><-</span> get *next, <span class="Constant">value:offset</span> <span id="L1534" class="LineNr">1534 </span> <span class="Conceal">¦</span> at-end-of-line?:bool <span class="Special"><-</span> equal nextc, <span class="Constant">10/newline</span> @@ -1712,20 +1712,20 @@ if ('onhashchange' in window) { <span id="L1650" class="LineNr">1650 </span> <span class="Conceal">¦</span> delete-to-start-of-line?:bool <span class="Special"><-</span> equal c, <span class="Constant">21/ctrl-u</span> <span id="L1651" class="LineNr">1651 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> delete-to-start-of-line? <span id="L1652" class="LineNr">1652 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <a href='003-shortcuts.mu.html#L1652'><delete-to-start-of-line-begin></a></span> -<span id="L1653" class="LineNr">1653 </span> <span class="Conceal">¦</span> deleted-cells:&:duplex-list:char <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L1659'>delete-to-start-of-line</a> editor +<span id="L1653" class="LineNr">1653 </span> <span class="Conceal">¦</span> deleted-cells:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L1659'>delete-to-start-of-line</a> editor <span id="L1654" class="LineNr">1654 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <a href='003-shortcuts.mu.html#L1654'><delete-to-start-of-line-end></a></span> <span id="L1655" class="LineNr">1655 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">1/go-render</span> <span id="L1656" class="LineNr">1656 </span> <span class="Delimiter">}</span> <span id="L1657" class="LineNr">1657 </span>] <span id="L1658" class="LineNr">1658 </span> -<span id="L1659" class="LineNr">1659 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L1659'>delete-to-start-of-line</a> editor:&:editor<span class="muRecipe"> -> </span>result:&:duplex-list:char, editor:&:editor [ +<span id="L1659" class="LineNr">1659 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L1659'>delete-to-start-of-line</a> editor:&:editor<span class="muRecipe"> -> </span>result:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char, editor:&:editor [ <span id="L1660" class="LineNr">1660 </span> <span class="Constant">local-scope</span> <span id="L1661" class="LineNr">1661 </span> <span class="Constant">load-ingredients</span> <span id="L1662" class="LineNr">1662 </span> <span class="Comment"># compute range to delete</span> -<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> <a href='../065duplex_list.mu.html#L29'>next</a> before-cursor +<span id="L1663" class="LineNr">1663 </span> init:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">data:offset</span> +<span id="L1664" class="LineNr">1664 </span> before-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> +<span id="L1665" class="LineNr">1665 </span> start:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> copy before-cursor +<span id="L1666" class="LineNr">1666 </span> end:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>: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> <span class="Conceal">¦</span> at-start-of-text?:bool <span class="Special"><-</span> equal start, init <span id="L1669" class="LineNr">1669 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> at-start-of-text? @@ -1737,7 +1737,7 @@ if ('onhashchange' in window) { <span id="L1675" class="LineNr">1675 </span> <span class="Conceal">¦</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> <a href='../065duplex_list.mu.html#L29'>next</a> start +<span id="L1678" class="LineNr">1678 </span> result:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>: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#L357'>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 @@ -1849,18 +1849,18 @@ if ('onhashchange' in window) { <span id="L1787" class="LineNr">1787 </span> <span class="Conceal">¦</span> delete-to-end-of-line?:bool <span class="Special"><-</span> equal c, <span class="Constant">11/ctrl-k</span> <span id="L1788" class="LineNr">1788 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> delete-to-end-of-line? <span id="L1789" class="LineNr">1789 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <a href='003-shortcuts.mu.html#L1789'><delete-to-end-of-line-begin></a></span> -<span id="L1790" class="LineNr">1790 </span> <span class="Conceal">¦</span> deleted-cells:&:duplex-list:char <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L1796'>delete-to-end-of-line</a> editor +<span id="L1790" class="LineNr">1790 </span> <span class="Conceal">¦</span> deleted-cells:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L1796'>delete-to-end-of-line</a> editor <span id="L1791" class="LineNr">1791 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <a href='003-shortcuts.mu.html#L1791'><delete-to-end-of-line-end></a></span> <span id="L1792" class="LineNr">1792 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">1/go-render</span> <span id="L1793" class="LineNr">1793 </span> <span class="Delimiter">}</span> <span id="L1794" class="LineNr">1794 </span>] <span id="L1795" class="LineNr">1795 </span> -<span id="L1796" class="LineNr">1796 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L1796'>delete-to-end-of-line</a> editor:&:editor<span class="muRecipe"> -> </span>result:&:duplex-list:char, editor:&:editor [ +<span id="L1796" class="LineNr">1796 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L1796'>delete-to-end-of-line</a> editor:&:editor<span class="muRecipe"> -> </span>result:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char, editor:&:editor [ <span id="L1797" class="LineNr">1797 </span> <span class="Constant">local-scope</span> <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> <a href='../065duplex_list.mu.html#L29'>next</a> start +<span id="L1800" class="LineNr">1800 </span> start:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> +<span id="L1801" class="LineNr">1801 </span> end:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>: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> <span class="Conceal">¦</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="Conceal">¦</span> <span class="muControl">break-if</span> at-end-of-text? @@ -2033,11 +2033,11 @@ if ('onhashchange' in window) { <span id="L1971" class="LineNr">1971 </span> <span id="L1972" class="LineNr">1972 </span><span class="muRecipe">after</span> <span class="Constant"><scroll-down></span> [ <span id="L1973" class="LineNr">1973 </span> trace<span class="Constant"> 10</span>, <span class="Constant">[app]</span>, <span class="Constant">[scroll down]</span> -<span id="L1974" class="LineNr">1974 </span> top-of-screen:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> +<span id="L1974" class="LineNr">1974 </span> top-of-screen:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L1975" class="LineNr">1975 </span> left:num <span class="Special"><-</span> get *editor, <span class="Constant">left:offset</span> <span id="L1976" class="LineNr">1976 </span> right:num <span class="Special"><-</span> get *editor, <span class="Constant">right:offset</span> <span id="L1977" class="LineNr">1977 </span> max:num <span class="Special"><-</span> subtract right, left -<span id="L1978" class="LineNr">1978 </span> old-top:&:duplex-list:char <span class="Special"><-</span> copy top-of-screen +<span id="L1978" class="LineNr">1978 </span> old-top:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> copy top-of-screen <span id="L1979" class="LineNr">1979 </span> top-of-screen <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L1988'>before-start-of-next-line</a> top-of-screen, max <span id="L1980" class="LineNr">1980 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">top-of-screen:offset</span>, top-of-screen <span id="L1981" class="LineNr">1981 </span> no-movement?:bool <span class="Special"><-</span> equal old-top, top-of-screen @@ -2047,11 +2047,11 @@ if ('onhashchange' in window) { <span id="L1985" class="LineNr">1985 </span><span class="Comment"># takes a pointer into the doubly-linked list, scans ahead at most 'max'</span> <span id="L1986" class="LineNr">1986 </span><span class="Comment"># positions until the next newline</span> <span id="L1987" class="LineNr">1987 </span><span class="Comment"># beware: never return null pointer.</span> -<span id="L1988" class="LineNr">1988 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L1988'>before-start-of-next-line</a> original:&:duplex-list:char, max:num<span class="muRecipe"> -> </span>curr:&:duplex-list:char [ +<span id="L1988" class="LineNr">1988 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L1988'>before-start-of-next-line</a> original:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char, max:num<span class="muRecipe"> -> </span>curr:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char [ <span id="L1989" class="LineNr">1989 </span> <span class="Constant">local-scope</span> <span id="L1990" class="LineNr">1990 </span> <span class="Constant">load-ingredients</span> <span id="L1991" class="LineNr">1991 </span> count:num <span class="Special"><-</span> copy<span class="Constant"> 0</span> -<span id="L1992" class="LineNr">1992 </span> curr:&:duplex-list:char <span class="Special"><-</span> copy original +<span id="L1992" class="LineNr">1992 </span> curr:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> copy original <span id="L1993" class="LineNr">1993 </span> <span class="Comment"># skip the initial newline if it exists</span> <span id="L1994" class="LineNr">1994 </span> <span class="Delimiter">{</span> <span id="L1995" class="LineNr">1995 </span> <span class="Conceal">¦</span> c:char <span class="Special"><-</span> get *curr, <span class="Constant">value:offset</span> @@ -2415,8 +2415,8 @@ if ('onhashchange' in window) { <span id="L2353" class="LineNr">2353 </span> <span id="L2354" class="LineNr">2354 </span><span class="muRecipe">after</span> <span class="Constant"><scroll-up></span> [ <span id="L2355" class="LineNr">2355 </span> trace<span class="Constant"> 10</span>, <span class="Constant">[app]</span>, <span class="Constant">[scroll up]</span> -<span id="L2356" class="LineNr">2356 </span> top-of-screen:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> -<span id="L2357" class="LineNr">2357 </span> old-top:&:duplex-list:char <span class="Special"><-</span> copy top-of-screen +<span id="L2356" class="LineNr">2356 </span> top-of-screen:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> +<span id="L2357" class="LineNr">2357 </span> old-top:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> copy top-of-screen <span id="L2358" class="LineNr">2358 </span> top-of-screen <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L2367'>before-previous-line</a> top-of-screen, editor <span id="L2359" class="LineNr">2359 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">top-of-screen:offset</span>, top-of-screen <span id="L2360" class="LineNr">2360 </span> no-movement?:bool <span class="Special"><-</span> equal old-top, top-of-screen @@ -2426,10 +2426,10 @@ if ('onhashchange' in window) { <span id="L2364" class="LineNr">2364 </span><span class="Comment"># takes a pointer into the doubly-linked list, scans back to before start of</span> <span id="L2365" class="LineNr">2365 </span><span class="Comment"># previous *wrapped* line</span> <span id="L2366" class="LineNr">2366 </span><span class="Comment"># beware: never return null pointer</span> -<span id="L2367" class="LineNr">2367 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L2367'>before-previous-line</a> in:&:duplex-list:char, editor:&:editor<span class="muRecipe"> -> </span>out:&:duplex-list:char [ +<span id="L2367" class="LineNr">2367 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L2367'>before-previous-line</a> in:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char, editor:&:editor<span class="muRecipe"> -> </span>out:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char [ <span id="L2368" class="LineNr">2368 </span> <span class="Constant">local-scope</span> <span id="L2369" class="LineNr">2369 </span> <span class="Constant">load-ingredients</span> -<span id="L2370" class="LineNr">2370 </span> curr:&:duplex-list:char <span class="Special"><-</span> copy in +<span id="L2370" class="LineNr">2370 </span> curr:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> copy in <span id="L2371" class="LineNr">2371 </span> c:char <span class="Special"><-</span> get *curr, <span class="Constant">value:offset</span> <span id="L2372" class="LineNr">2372 </span> <span class="Comment"># compute max, number of characters to skip</span> <span id="L2373" class="LineNr">2373 </span> <span class="Comment"># 1 + len%(width-1)</span> @@ -2437,12 +2437,12 @@ if ('onhashchange' in window) { <span id="L2375" class="LineNr">2375 </span> left:num <span class="Special"><-</span> get *editor, <span class="Constant">left:offset</span> <span id="L2376" class="LineNr">2376 </span> right:num <span class="Special"><-</span> get *editor, <span class="Constant">right:offset</span> <span id="L2377" class="LineNr">2377 </span> max-line-length:num <span class="Special"><-</span> subtract right, left, <span class="Constant">-1/exclusive-right</span>, <span class="Constant">1/wrap-icon</span> -<span id="L2378" class="LineNr">2378 </span> sentinel:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">data:offset</span> +<span id="L2378" class="LineNr">2378 </span> sentinel:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">data:offset</span> <span id="L2379" class="LineNr">2379 </span> len:num <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L193'>previous-line-length</a> curr, sentinel <span id="L2380" class="LineNr">2380 </span> <span class="Delimiter">{</span> <span id="L2381" class="LineNr">2381 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> len <span id="L2382" class="LineNr">2382 </span> <span class="Conceal">¦</span> <span class="Comment"># empty line; just skip this newline</span> -<span id="L2383" class="LineNr">2383 </span> <span class="Conceal">¦</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="L2383" class="LineNr">2383 </span> <span class="Conceal">¦</span> <a href='../065duplex_list.mu.html#L36'>prev</a>:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L36'>prev</a> curr <span id="L2384" class="LineNr">2384 </span> <span class="Conceal">¦</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="Conceal">¦</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> @@ -2458,7 +2458,7 @@ if ('onhashchange' in window) { <span id="L2396" class="LineNr">2396 </span> <span class="Delimiter">{</span> <span id="L2397" class="LineNr">2397 </span> <span class="Conceal">¦</span> done?:bool <span class="Special"><-</span> greater-or-equal count, max <span id="L2398" class="LineNr">2398 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> done? -<span id="L2399" class="LineNr">2399 </span> <span class="Conceal">¦</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="L2399" class="LineNr">2399 </span> <span class="Conceal">¦</span> <a href='../065duplex_list.mu.html#L36'>prev</a>:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L36'>prev</a> curr <span id="L2400" class="LineNr">2400 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> <a href='../065duplex_list.mu.html#L36'>prev</a> <span id="L2401" class="LineNr">2401 </span> <span class="Conceal">¦</span> curr <span class="Special"><-</span> copy <a href='../065duplex_list.mu.html#L36'>prev</a> <span id="L2402" class="LineNr">2402 </span> <span class="Conceal">¦</span> count <span class="Special"><-</span> add count,<span class="Constant"> 1</span> @@ -2820,12 +2820,12 @@ if ('onhashchange' in window) { <span id="L2758" class="LineNr">2758 </span> <span class="Delimiter">{</span> <span id="L2759" class="LineNr">2759 </span> <span class="Conceal">¦</span> page-down?:bool <span class="Special"><-</span> equal c, <span class="Constant">6/ctrl-f</span> <span id="L2760" class="LineNr">2760 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> page-down? -<span id="L2761" class="LineNr">2761 </span> <span class="Conceal">¦</span> old-top:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> +<span id="L2761" class="LineNr">2761 </span> <span class="Conceal">¦</span> old-top:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L2762" class="LineNr">2762 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <move-cursor-begin></span> <span id="L2763" class="LineNr">2763 </span> <span class="Conceal">¦</span> <a href='003-shortcuts.mu.html#L2789'>page-down</a> editor <span id="L2764" class="LineNr">2764 </span> <span class="Conceal">¦</span> undo-coalesce-tag:num <span class="Special"><-</span> copy <span class="Constant">0/never</span> <span id="L2765" class="LineNr">2765 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <move-cursor-end></span> -<span id="L2766" class="LineNr">2766 </span> <span class="Conceal">¦</span> top-of-screen:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> +<span id="L2766" class="LineNr">2766 </span> <span class="Conceal">¦</span> top-of-screen:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L2767" class="LineNr">2767 </span> <span class="Conceal">¦</span> movement?:bool <span class="Special"><-</span> not-equal top-of-screen, old-top <span id="L2768" class="LineNr">2768 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> movement?/go-render <span id="L2769" class="LineNr">2769 </span> <span class="Delimiter">}</span> @@ -2835,12 +2835,12 @@ if ('onhashchange' in window) { <span id="L2773" class="LineNr">2773 </span> <span class="Delimiter">{</span> <span id="L2774" class="LineNr">2774 </span> <span class="Conceal">¦</span> page-down?:bool <span class="Special"><-</span> equal k, <span class="Constant">65518/page-down</span> <span id="L2775" class="LineNr">2775 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> page-down? -<span id="L2776" class="LineNr">2776 </span> <span class="Conceal">¦</span> old-top:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> +<span id="L2776" class="LineNr">2776 </span> <span class="Conceal">¦</span> old-top:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L2777" class="LineNr">2777 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <move-cursor-begin></span> <span id="L2778" class="LineNr">2778 </span> <span class="Conceal">¦</span> <a href='003-shortcuts.mu.html#L2789'>page-down</a> editor <span id="L2779" class="LineNr">2779 </span> <span class="Conceal">¦</span> undo-coalesce-tag:num <span class="Special"><-</span> copy <span class="Constant">0/never</span> <span id="L2780" class="LineNr">2780 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <move-cursor-end></span> -<span id="L2781" class="LineNr">2781 </span> <span class="Conceal">¦</span> top-of-screen:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> +<span id="L2781" class="LineNr">2781 </span> <span class="Conceal">¦</span> top-of-screen:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L2782" class="LineNr">2782 </span> <span class="Conceal">¦</span> movement?:bool <span class="Special"><-</span> not-equal top-of-screen, old-top <span id="L2783" class="LineNr">2783 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> movement?/go-render <span id="L2784" class="LineNr">2784 </span> <span class="Delimiter">}</span> @@ -2852,11 +2852,11 @@ if ('onhashchange' in window) { <span id="L2790" class="LineNr">2790 </span> <span class="Constant">local-scope</span> <span id="L2791" class="LineNr">2791 </span> <span class="Constant">load-ingredients</span> <span id="L2792" class="LineNr">2792 </span> <span class="Comment"># if editor contents don't overflow screen, do nothing</span> -<span id="L2793" class="LineNr">2793 </span> bottom-of-screen:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">bottom-of-screen:offset</span> +<span id="L2793" class="LineNr">2793 </span> bottom-of-screen:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">bottom-of-screen:offset</span> <span id="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> <a href='../065duplex_list.mu.html#L36'>prev</a> bottom-of-screen +<span id="L2796" class="LineNr">2796 </span> before-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> +<span id="L2797" class="LineNr">2797 </span> before-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>: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> @@ -3019,12 +3019,12 @@ if ('onhashchange' in window) { <span id="L2957" class="LineNr">2957 </span> <span class="Delimiter">{</span> <span id="L2958" class="LineNr">2958 </span> <span class="Conceal">¦</span> page-up?:bool <span class="Special"><-</span> equal c, <span class="Constant">2/ctrl-b</span> <span id="L2959" class="LineNr">2959 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> page-up? -<span id="L2960" class="LineNr">2960 </span> <span class="Conceal">¦</span> old-top:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> +<span id="L2960" class="LineNr">2960 </span> <span class="Conceal">¦</span> old-top:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L2961" class="LineNr">2961 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <move-cursor-begin></span> <span id="L2962" class="LineNr">2962 </span> <span class="Conceal">¦</span> editor <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L2987'>page-up</a> editor, <a href='../081print.mu.html#L587'>screen-height</a> <span id="L2963" class="LineNr">2963 </span> <span class="Conceal">¦</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"> </span><span class="Conceal">¦</span><span class="Constant"> <move-cursor-end></span> -<span id="L2965" class="LineNr">2965 </span> <span class="Conceal">¦</span> top-of-screen:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> +<span id="L2965" class="LineNr">2965 </span> <span class="Conceal">¦</span> top-of-screen:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L2966" class="LineNr">2966 </span> <span class="Conceal">¦</span> movement?:bool <span class="Special"><-</span> not-equal top-of-screen, old-top <span id="L2967" class="LineNr">2967 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> movement?/go-render <span id="L2968" class="LineNr">2968 </span> <span class="Delimiter">}</span> @@ -3034,12 +3034,12 @@ if ('onhashchange' in window) { <span id="L2972" class="LineNr">2972 </span> <span class="Delimiter">{</span> <span id="L2973" class="LineNr">2973 </span> <span class="Conceal">¦</span> page-up?:bool <span class="Special"><-</span> equal k, <span class="Constant">65519/page-up</span> <span id="L2974" class="LineNr">2974 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> page-up? -<span id="L2975" class="LineNr">2975 </span> <span class="Conceal">¦</span> old-top:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> +<span id="L2975" class="LineNr">2975 </span> <span class="Conceal">¦</span> old-top:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L2976" class="LineNr">2976 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <move-cursor-begin></span> <span id="L2977" class="LineNr">2977 </span> <span class="Conceal">¦</span> editor <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L2987'>page-up</a> editor, <a href='../081print.mu.html#L587'>screen-height</a> <span id="L2978" class="LineNr">2978 </span> <span class="Conceal">¦</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"> </span><span class="Conceal">¦</span><span class="Constant"> <move-cursor-end></span> -<span id="L2980" class="LineNr">2980 </span> <span class="Conceal">¦</span> top-of-screen:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> +<span id="L2980" class="LineNr">2980 </span> <span class="Conceal">¦</span> top-of-screen:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L2981" class="LineNr">2981 </span> <span class="Conceal">¦</span> movement?:bool <span class="Special"><-</span> not-equal top-of-screen, old-top <span id="L2982" class="LineNr">2982 </span> <span class="Conceal">¦</span> <span class="Comment"># don't bother re-rendering if nothing changed. todo: test this</span> <span id="L2983" class="LineNr">2983 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> movement?/go-render @@ -3051,11 +3051,11 @@ if ('onhashchange' in window) { <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 <a href='../081print.mu.html#L587'>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="L2992" class="LineNr">2992 </span> top-of-screen:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L2993" class="LineNr">2993 </span> <span class="Delimiter">{</span> <span id="L2994" class="LineNr">2994 </span> <span class="Conceal">¦</span> done?:bool <span class="Special"><-</span> greater-or-equal count, max <span id="L2995" class="LineNr">2995 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> done? -<span id="L2996" class="LineNr">2996 </span> <span class="Conceal">¦</span> <a href='../065duplex_list.mu.html#L36'>prev</a>:&:duplex-list:char <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L2367'>before-previous-line</a> top-of-screen, editor +<span id="L2996" class="LineNr">2996 </span> <span class="Conceal">¦</span> <a href='../065duplex_list.mu.html#L36'>prev</a>:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L2367'>before-previous-line</a> top-of-screen, editor <span id="L2997" class="LineNr">2997 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> <a href='../065duplex_list.mu.html#L36'>prev</a> <span id="L2998" class="LineNr">2998 </span> <span class="Conceal">¦</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> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">top-of-screen:offset</span>, top-of-screen diff --git a/html/edit/004-programming-environment.mu.html b/html/edit/004-programming-environment.mu.html index 639825f9..2aeba796 100644 --- a/html/edit/004-programming-environment.mu.html +++ b/html/edit/004-programming-environment.mu.html @@ -257,19 +257,19 @@ if ('onhashchange' in window) { <span id="L194" class="LineNr">194 </span> left:num <span class="Special"><-</span> get *editor, <span class="Constant">left:offset</span> <span id="L195" class="LineNr">195 </span> <a href='../081print.mu.html#L587'>screen-height</a>:num <span class="Special"><-</span> <a href='../081print.mu.html#L587'>screen-height</a> <a href='../081print.mu.html#L4'>screen</a> <span id="L196" class="LineNr">196 </span> right:num <span class="Special"><-</span> get *editor, <span class="Constant">right:offset</span> -<span id="L197" class="LineNr">197 </span> curr:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> -<span id="L198" class="LineNr">198 </span> <a href='../065duplex_list.mu.html#L36'>prev</a>:&:duplex-list:char <span class="Special"><-</span> copy curr <span class="Comment"># just in case curr becomes null and we can't compute prev</span> +<span id="L197" class="LineNr">197 </span> curr:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> +<span id="L198" class="LineNr">198 </span> <a href='../065duplex_list.mu.html#L36'>prev</a>:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> copy curr <span class="Comment"># just in case curr becomes null and we can't compute prev</span> <span id="L199" class="LineNr">199 </span> curr <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L29'>next</a> curr <span id="L200" class="LineNr">200 </span> color:num <span class="Special"><-</span> copy <span class="Constant">7/white</span> <span id="L201" class="LineNr">201 </span> row:num <span class="Special"><-</span> copy <span class="Constant">1/top</span> <span id="L202" class="LineNr">202 </span> column:num <span class="Special"><-</span> copy left <span id="L203" class="LineNr">203 </span> <span class="Comment"># save before-cursor</span> -<span id="L204" class="LineNr">204 </span> old-before-cursor:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> +<span id="L204" class="LineNr">204 </span> old-before-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> <span id="L205" class="LineNr">205 </span> <span class="Comment"># initialze cursor-row/cursor-column/before-cursor to the top of the screen</span> <span id="L206" class="LineNr">206 </span> <span class="Comment"># by default</span> <span id="L207" class="LineNr">207 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-row:offset</span>, row <span id="L208" class="LineNr">208 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-column:offset</span>, column -<span id="L209" class="LineNr">209 </span> top-of-screen:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> +<span id="L209" class="LineNr">209 </span> top-of-screen:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L210" class="LineNr">210 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">before-cursor:offset</span>, top-of-screen <span id="L211" class="LineNr">211 </span> <a href='../081print.mu.html#L4'>screen</a> <span class="Special"><-</span> <a href='../081print.mu.html#L435'>move-cursor</a> <a href='../081print.mu.html#L4'>screen</a>, row, column <span id="L212" class="LineNr">212 </span> <span class="Delimiter">{</span> diff --git a/html/edit/005-sandbox.mu.html b/html/edit/005-sandbox.mu.html index 8346152a..9eb7d9f8 100644 --- a/html/edit/005-sandbox.mu.html +++ b/html/edit/005-sandbox.mu.html @@ -227,7 +227,7 @@ if ('onhashchange' in window) { <span id="L164" class="LineNr"> 164 </span> <span class="Conceal">¦</span> sandbox-count <span class="Special"><-</span> add sandbox-count,<span class="Constant"> 1</span> <span id="L165" class="LineNr"> 165 </span> <span class="Conceal">¦</span> *env <span class="Special"><-</span> put *env, <span class="Constant">number-of-sandboxes:offset</span>, sandbox-count <span id="L166" class="LineNr"> 166 </span> <span class="Conceal">¦</span> <span class="Comment"># clear sandbox editor</span> -<span id="L167" class="LineNr"> 167 </span> <span class="Conceal">¦</span> init:&:duplex-list:char <span class="Special"><-</span> push <span class="Constant">167/§</span>, <span class="Constant">0/tail</span> +<span id="L167" class="LineNr"> 167 </span> <span class="Conceal">¦</span> init:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> push <span class="Constant">167/§</span>, <span class="Constant">0/tail</span> <span id="L168" class="LineNr"> 168 </span> <span class="Conceal">¦</span> *current-sandbox <span class="Special"><-</span> put *current-sandbox, <span class="Constant">data:offset</span>, init <span id="L169" class="LineNr"> 169 </span> <span class="Conceal">¦</span> *current-sandbox <span class="Special"><-</span> put *current-sandbox, <span class="Constant">top-of-screen:offset</span>, init <span id="L170" class="LineNr"> 170 </span> <span class="Delimiter">}</span> @@ -759,8 +759,8 @@ if ('onhashchange' in window) { <span id="L696" class="LineNr"> 696 </span><span class="muRecipe">def</span> <a href='005-sandbox.mu.html#L696'>editor-contents</a> editor:&:editor<span class="muRecipe"> -> </span>result:text [ <span id="L697" class="LineNr"> 697 </span> <span class="Constant">local-scope</span> <span id="L698" class="LineNr"> 698 </span> <span class="Constant">load-ingredients</span> -<span id="L699" class="LineNr"> 699 </span> buf:&:buffer <span class="Special"><-</span> <a href='../061text.mu.html#L131'>new-buffer</a><span class="Constant"> 80</span> -<span id="L700" class="LineNr"> 700 </span> curr:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">data:offset</span> +<span id="L699" class="LineNr"> 699 </span> buf:&:<a href='../061text.mu.html#L126'>buffer</a> <span class="Special"><-</span> <a href='../061text.mu.html#L131'>new-buffer</a><span class="Constant"> 80</span> +<span id="L700" class="LineNr"> 700 </span> curr:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">data:offset</span> <span id="L701" class="LineNr"> 701 </span> <span class="Comment"># skip § sentinel</span> <span id="L702" class="LineNr"> 702 </span> assert curr, <span class="Constant">[editor without data is illegal; must have at least a sentinel]</span> <span id="L703" class="LineNr"> 703 </span> curr <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L29'>next</a> curr diff --git a/html/edit/006-sandbox-copy.mu.html b/html/edit/006-sandbox-copy.mu.html index 16b8d819..61a06072 100644 --- a/html/edit/006-sandbox-copy.mu.html +++ b/html/edit/006-sandbox-copy.mu.html @@ -263,8 +263,8 @@ if ('onhashchange' in window) { <span id="L201" class="LineNr">201 </span><span class="muRecipe">def</span> <a href='006-sandbox-copy.mu.html#L201'>empty-editor?</a> editor:&:editor<span class="muRecipe"> -> </span>result:bool [ <span id="L202" class="LineNr">202 </span> <span class="Constant">local-scope</span> <span id="L203" class="LineNr">203 </span> <span class="Constant">load-ingredients</span> -<span id="L204" class="LineNr">204 </span> head:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">data:offset</span> -<span id="L205" class="LineNr">205 </span> first:&:duplex-list:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L29'>next</a> head +<span id="L204" class="LineNr">204 </span> head:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">data:offset</span> +<span id="L205" class="LineNr">205 </span> first:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L29'>next</a> head <span id="L206" class="LineNr">206 </span> result <span class="Special"><-</span> not first <span id="L207" class="LineNr">207 </span>] <span id="L208" class="LineNr">208 </span> diff --git a/html/edit/011-errors.mu.html b/html/edit/011-errors.mu.html index a22244b0..8c2a1f1c 100644 --- a/html/edit/011-errors.mu.html +++ b/html/edit/011-errors.mu.html @@ -377,12 +377,12 @@ if ('onhashchange' in window) { <span id="L314" class="LineNr">314 </span> <span class="Comment"># overload a well-known shape-shifting recipe</span> <span id="L315" class="LineNr">315 </span> assume-resources [ <span id="L316" class="LineNr">316 </span> <span class="Conceal">¦</span> <span class="Constant">[lesson/recipes.mu]</span> <span class="Special"><-</span> [ -<span id="L317" class="LineNr">317 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Constant">|recipe</span> length l:&:list:_elem<span class="muRecipe"> -> </span>n:num <span class="Constant">[|</span> +<span id="L317" class="LineNr">317 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Constant">|recipe</span> length l:&:<a href='../064list.mu.html#L6'>list</a>:_elem<span class="muRecipe"> -> </span>n:num <span class="Constant">[|</span> <span id="L318" class="LineNr">318 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> |]</span>| <span id="L319" class="LineNr">319 </span> <span class="Conceal">¦</span> ] <span id="L320" class="LineNr">320 </span> ] <span id="L321" class="LineNr">321 </span> <span class="Comment"># call code that uses other variants of it, but not it itself</span> -<span id="L322" class="LineNr">322 </span> test-sandbox:text <span class="Special"><-</span> new <span class="Constant">[x:&:list:num <- copy 0</span> +<span id="L322" class="LineNr">322 </span> test-sandbox:text <span class="Special"><-</span> new <span class="Constant">[x:&:<a href='../064list.mu.html#L6'>list</a>:num <- copy 0</span> <span id="L323" class="LineNr">323 </span><span class="Constant">to-text x]</span> <span id="L324" class="LineNr">324 </span> env:&:environment <span class="Special"><-</span> <a href='004-programming-environment.mu.html#L21'>new-programming-environment</a> <a href='../088file.mu.html#L11'>resources</a>, <a href='../081print.mu.html#L4'>screen</a>, test-sandbox <span id="L325" class="LineNr">325 </span> <span class="Comment"># run it once</span> diff --git a/html/edit/012-editor-undo.mu.html b/html/edit/012-editor-undo.mu.html index bf1b7c99..2c227c0f 100644 --- a/html/edit/012-editor-undo.mu.html +++ b/html/edit/012-editor-undo.mu.html @@ -74,13 +74,13 @@ if ('onhashchange' in window) { <span id="L11" class="LineNr"> 11 </span><span class="muData">container</span> <a href='012-editor-undo.mu.html#L11'>insert-operation</a> [ <span id="L12" class="LineNr"> 12 </span> before-row:num <span id="L13" class="LineNr"> 13 </span> before-column:num -<span id="L14" class="LineNr"> 14 </span> before-top-of-screen:&:duplex-list:char +<span id="L14" class="LineNr"> 14 </span> before-top-of-screen:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span id="L15" class="LineNr"> 15 </span> after-row:num <span id="L16" class="LineNr"> 16 </span> after-column:num -<span id="L17" class="LineNr"> 17 </span> after-top-of-screen:&:duplex-list:char +<span id="L17" class="LineNr"> 17 </span> after-top-of-screen:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span id="L18" class="LineNr"> 18 </span> <span class="Comment"># inserted text is from 'insert-from' until 'insert-until'; list doesn't have to terminate</span> -<span id="L19" class="LineNr"> 19 </span> insert-from:&:duplex-list:char -<span id="L20" class="LineNr"> 20 </span> insert-until:&:duplex-list:char +<span id="L19" class="LineNr"> 19 </span> insert-from:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char +<span id="L20" class="LineNr"> 20 </span> insert-until:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span id="L21" class="LineNr"> 21 </span> tag:num <span class="Comment"># event causing this operation; might be used to coalesce runs of similar events</span> <span id="L22" class="LineNr"> 22 </span> <span class="Conceal">¦</span> <span class="Comment"># 0: no coalesce (enter+indent)</span> <span id="L23" class="LineNr"> 23 </span> <span class="Conceal">¦</span> <span class="Comment"># 1: regular alphanumeric characters</span> @@ -89,10 +89,10 @@ if ('onhashchange' in window) { <span id="L26" class="LineNr"> 26 </span><span class="muData">container</span> <a href='012-editor-undo.mu.html#L26'>move-operation</a> [ <span id="L27" class="LineNr"> 27 </span> before-row:num <span id="L28" class="LineNr"> 28 </span> before-column:num -<span id="L29" class="LineNr"> 29 </span> before-top-of-screen:&:duplex-list:char +<span id="L29" class="LineNr"> 29 </span> before-top-of-screen:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span id="L30" class="LineNr"> 30 </span> after-row:num <span id="L31" class="LineNr"> 31 </span> after-column:num -<span id="L32" class="LineNr"> 32 </span> after-top-of-screen:&:duplex-list:char +<span id="L32" class="LineNr"> 32 </span> after-top-of-screen:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span id="L33" class="LineNr"> 33 </span> tag:num <span class="Comment"># event causing this operation; might be used to coalesce runs of similar events</span> <span id="L34" class="LineNr"> 34 </span> <span class="Conceal">¦</span> <span class="Comment"># 0: no coalesce (touch events, etc)</span> <span id="L35" class="LineNr"> 35 </span> <span class="Conceal">¦</span> <span class="Comment"># 1: left arrow</span> @@ -104,13 +104,13 @@ if ('onhashchange' in window) { <span id="L41" class="LineNr"> 41 </span><span class="muData">container</span> <a href='012-editor-undo.mu.html#L41'>delete-operation</a> [ <span id="L42" class="LineNr"> 42 </span> before-row:num <span id="L43" class="LineNr"> 43 </span> before-column:num -<span id="L44" class="LineNr"> 44 </span> before-top-of-screen:&:duplex-list:char +<span id="L44" class="LineNr"> 44 </span> before-top-of-screen:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span id="L45" class="LineNr"> 45 </span> after-row:num <span id="L46" class="LineNr"> 46 </span> after-column:num -<span id="L47" class="LineNr"> 47 </span> after-top-of-screen:&:duplex-list:char -<span id="L48" class="LineNr"> 48 </span> deleted-text:&:duplex-list:char -<span id="L49" class="LineNr"> 49 </span> delete-from:&:duplex-list:char -<span id="L50" class="LineNr"> 50 </span> delete-until:&:duplex-list:char +<span id="L47" class="LineNr"> 47 </span> after-top-of-screen:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char +<span id="L48" class="LineNr"> 48 </span> deleted-text:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char +<span id="L49" class="LineNr"> 49 </span> delete-from:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char +<span id="L50" class="LineNr"> 50 </span> delete-until:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span id="L51" class="LineNr"> 51 </span> tag:num <span class="Comment"># event causing this operation; might be used to coalesce runs of similar events</span> <span id="L52" class="LineNr"> 52 </span> <span class="Conceal">¦</span> <span class="Comment"># 0: no coalesce (ctrl-k, ctrl-u)</span> <span id="L53" class="LineNr"> 53 </span> <span class="Conceal">¦</span> <span class="Comment"># 1: backspace</span> @@ -119,8 +119,8 @@ if ('onhashchange' in window) { <span id="L56" class="LineNr"> 56 </span> <span id="L57" class="LineNr"> 57 </span><span class="Comment"># every editor accumulates a list of operations to undo/redo</span> <span id="L58" class="LineNr"> 58 </span><span class="muData">container</span> editor [ -<span id="L59" class="LineNr"> 59 </span> undo:&:list:&:<a href='012-editor-undo.mu.html#L5'>operation</a> -<span id="L60" class="LineNr"> 60 </span> redo:&:list:&:<a href='012-editor-undo.mu.html#L5'>operation</a> +<span id="L59" class="LineNr"> 59 </span> undo:&:<a href='../064list.mu.html#L6'>list</a>:&:<a href='012-editor-undo.mu.html#L5'>operation</a> +<span id="L60" class="LineNr"> 60 </span> redo:&:<a href='../064list.mu.html#L6'>list</a>:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span id="L61" class="LineNr"> 61 </span>] <span id="L62" class="LineNr"> 62 </span> <span id="L63" class="LineNr"> 63 </span><span class="Comment"># ctrl-z - undo operation</span> @@ -128,12 +128,12 @@ if ('onhashchange' in window) { <span id="L65" class="LineNr"> 65 </span> <span class="Delimiter">{</span> <span id="L66" class="LineNr"> 66 </span> <span class="Conceal">¦</span> undo?:bool <span class="Special"><-</span> equal c, <span class="Constant">26/ctrl-z</span> <span id="L67" class="LineNr"> 67 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> undo? -<span id="L68" class="LineNr"> 68 </span> <span class="Conceal">¦</span> undo:&:list:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> get *editor, <span class="Constant">undo:offset</span> +<span id="L68" class="LineNr"> 68 </span> <span class="Conceal">¦</span> undo:&:<a href='../064list.mu.html#L6'>list</a>:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> get *editor, <span class="Constant">undo:offset</span> <span id="L69" class="LineNr"> 69 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> undo <span id="L70" class="LineNr"> 70 </span> <span class="Conceal">¦</span> op:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> first undo <span id="L71" class="LineNr"> 71 </span> <span class="Conceal">¦</span> undo <span class="Special"><-</span> <a href='../064list.mu.html#L25'>rest</a> undo <span id="L72" class="LineNr"> 72 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">undo:offset</span>, undo -<span id="L73" class="LineNr"> 73 </span> <span class="Conceal">¦</span> redo:&:list:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> get *editor, <span class="Constant">redo:offset</span> +<span id="L73" class="LineNr"> 73 </span> <span class="Conceal">¦</span> redo:&:<a href='../064list.mu.html#L6'>list</a>:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> get *editor, <span class="Constant">redo:offset</span> <span id="L74" class="LineNr"> 74 </span> <span class="Conceal">¦</span> redo <span class="Special"><-</span> push op, redo <span id="L75" class="LineNr"> 75 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">redo:offset</span>, redo <span id="L76" class="LineNr"> 76 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <a href='012-editor-undo.mu.html#L76'><handle-undo></a></span> @@ -146,12 +146,12 @@ if ('onhashchange' in window) { <span id="L83" class="LineNr"> 83 </span> <span class="Delimiter">{</span> <span id="L84" class="LineNr"> 84 </span> <span class="Conceal">¦</span> redo?:bool <span class="Special"><-</span> equal c, <span class="Constant">25/ctrl-y</span> <span id="L85" class="LineNr"> 85 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> redo? -<span id="L86" class="LineNr"> 86 </span> <span class="Conceal">¦</span> redo:&:list:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> get *editor, <span class="Constant">redo:offset</span> +<span id="L86" class="LineNr"> 86 </span> <span class="Conceal">¦</span> redo:&:<a href='../064list.mu.html#L6'>list</a>:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> get *editor, <span class="Constant">redo:offset</span> <span id="L87" class="LineNr"> 87 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> redo <span id="L88" class="LineNr"> 88 </span> <span class="Conceal">¦</span> op:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> first redo <span id="L89" class="LineNr"> 89 </span> <span class="Conceal">¦</span> redo <span class="Special"><-</span> <a href='../064list.mu.html#L25'>rest</a> redo <span id="L90" class="LineNr"> 90 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">redo:offset</span>, redo -<span id="L91" class="LineNr"> 91 </span> <span class="Conceal">¦</span> undo:&:list:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> get *editor, <span class="Constant">undo:offset</span> +<span id="L91" class="LineNr"> 91 </span> <span class="Conceal">¦</span> undo:&:<a href='../064list.mu.html#L6'>list</a>:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> get *editor, <span class="Constant">undo:offset</span> <span id="L92" class="LineNr"> 92 </span> <span class="Conceal">¦</span> undo <span class="Special"><-</span> push op, undo <span id="L93" class="LineNr"> 93 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">undo:offset</span>, undo <span id="L94" class="LineNr"> 94 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <a href='012-editor-undo.mu.html#L94'><handle-redo></a></span> @@ -202,14 +202,14 @@ if ('onhashchange' in window) { <span id="L139" class="LineNr"> 139 </span> <span id="L140" class="LineNr"> 140 </span><span class="Comment"># save operation to undo</span> <span id="L141" class="LineNr"> 141 </span><span class="muRecipe">after</span> <span class="Constant"><insert-character-begin></span> [ -<span id="L142" class="LineNr"> 142 </span> top-before:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> -<span id="L143" class="LineNr"> 143 </span> cursor-before:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> +<span id="L142" class="LineNr"> 142 </span> top-before:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> +<span id="L143" class="LineNr"> 143 </span> cursor-before:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> <span id="L144" class="LineNr"> 144 </span>] <span id="L145" class="LineNr"> 145 </span><span class="muRecipe">before</span> <span class="Constant"><insert-character-end></span> [ -<span id="L146" class="LineNr"> 146 </span> top-after:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> +<span id="L146" class="LineNr"> 146 </span> top-after:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L147" class="LineNr"> 147 </span> cursor-row:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-row:offset</span> <span id="L148" class="LineNr"> 148 </span> cursor-column:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-column:offset</span> -<span id="L149" class="LineNr"> 149 </span> undo:&:list:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> get *editor, <span class="Constant">undo:offset</span> +<span id="L149" class="LineNr"> 149 </span> undo:&:<a href='../064list.mu.html#L6'>list</a>:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> get *editor, <span class="Constant">undo:offset</span> <span id="L150" class="LineNr"> 150 </span> <span class="Delimiter">{</span> <span id="L151" class="LineNr"> 151 </span> <span class="Conceal">¦</span> <span class="Comment"># if previous operation was an insert, coalesce this operation with it</span> <span id="L152" class="LineNr"> 152 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> undo @@ -218,8 +218,8 @@ if ('onhashchange' in window) { <span id="L155" class="LineNr"> 155 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> is-insert? <span id="L156" class="LineNr"> 156 </span> <span class="Conceal">¦</span> previous-coalesce-tag:num <span class="Special"><-</span> get typing, <span class="Constant">tag:offset</span> <span id="L157" class="LineNr"> 157 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> previous-coalesce-tag -<span id="L158" class="LineNr"> 158 </span> <span class="Conceal">¦</span> before-cursor:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> -<span id="L159" class="LineNr"> 159 </span> <span class="Conceal">¦</span> insert-until:&:duplex-list:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L29'>next</a> before-cursor +<span id="L158" class="LineNr"> 158 </span> <span class="Conceal">¦</span> before-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> +<span id="L159" class="LineNr"> 159 </span> <span class="Conceal">¦</span> insert-until:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L29'>next</a> before-cursor <span id="L160" class="LineNr"> 160 </span> <span class="Conceal">¦</span> typing <span class="Special"><-</span> put typing, <span class="Constant">insert-until:offset</span>, insert-until <span id="L161" class="LineNr"> 161 </span> <span class="Conceal">¦</span> typing <span class="Special"><-</span> put typing, <span class="Constant">after-row:offset</span>, cursor-row <span id="L162" class="LineNr"> 162 </span> <span class="Conceal">¦</span> typing <span class="Special"><-</span> put typing, <span class="Constant">after-column:offset</span>, cursor-column @@ -228,8 +228,8 @@ if ('onhashchange' in window) { <span id="L165" class="LineNr"> 165 </span> <span class="Conceal">¦</span> <span class="muControl">break</span> <span class="Constant">+done-adding-insert-operation</span> <span id="L166" class="LineNr"> 166 </span> <span class="Delimiter">}</span> <span id="L167" class="LineNr"> 167 </span> <span class="Comment"># if not, create a new operation</span> -<span id="L168" class="LineNr"> 168 </span> insert-from:&:duplex-list:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L29'>next</a> cursor-before -<span id="L169" class="LineNr"> 169 </span> insert-to:&:duplex-list:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L29'>next</a> insert-from +<span id="L168" class="LineNr"> 168 </span> insert-from:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L29'>next</a> cursor-before +<span id="L169" class="LineNr"> 169 </span> insert-to:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L29'>next</a> insert-from <span id="L170" class="LineNr"> 170 </span> op:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> new <span class="Constant"><a href='012-editor-undo.mu.html#L5'>operation</a>:type</span> <span id="L171" class="LineNr"> 171 </span> *op <span class="Special"><-</span> merge <span class="Constant">0/insert-operation</span>, save-row/before, save-column/before, top-before, cursor-row/after, cursor-column/after, top-after, insert-from, insert-to, <span class="Constant">1/coalesce</span> <span id="L172" class="LineNr"> 172 </span> editor <span class="Special"><-</span> <a href='012-editor-undo.mu.html#L200'>add-operation</a> editor, op @@ -240,17 +240,17 @@ if ('onhashchange' in window) { <span id="L177" class="LineNr"> 177 </span><span class="muRecipe">after</span> <span class="Constant"><a href='002-typing.mu.html#L857'><insert-enter-begin></a></span> [ <span id="L178" class="LineNr"> 178 </span> cursor-row-before:num <span class="Special"><-</span> copy cursor-row <span id="L179" class="LineNr"> 179 </span> cursor-column-before:num <span class="Special"><-</span> copy cursor-column -<span id="L180" class="LineNr"> 180 </span> top-before:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> -<span id="L181" class="LineNr"> 181 </span> cursor-before:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> +<span id="L180" class="LineNr"> 180 </span> top-before:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> +<span id="L181" class="LineNr"> 181 </span> cursor-before:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> <span id="L182" class="LineNr"> 182 </span>] <span id="L183" class="LineNr"> 183 </span><span class="muRecipe">before</span> <span class="Constant"><a href='002-typing.mu.html#L859'><insert-enter-end></a></span> [ -<span id="L184" class="LineNr"> 184 </span> top-after:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> +<span id="L184" class="LineNr"> 184 </span> top-after:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L185" class="LineNr"> 185 </span> cursor-row:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-row:offset</span> <span id="L186" class="LineNr"> 186 </span> cursor-column:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-row:offset</span> <span id="L187" class="LineNr"> 187 </span> <span class="Comment"># never coalesce</span> -<span id="L188" class="LineNr"> 188 </span> insert-from:&:duplex-list:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L29'>next</a> cursor-before -<span id="L189" class="LineNr"> 189 </span> before-cursor:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> -<span id="L190" class="LineNr"> 190 </span> insert-to:&:duplex-list:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L29'>next</a> before-cursor +<span id="L188" class="LineNr"> 188 </span> insert-from:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L29'>next</a> cursor-before +<span id="L189" class="LineNr"> 189 </span> before-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> +<span id="L190" class="LineNr"> 190 </span> insert-to:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L29'>next</a> before-cursor <span id="L191" class="LineNr"> 191 </span> op:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> new <span class="Constant"><a href='012-editor-undo.mu.html#L5'>operation</a>:type</span> <span id="L192" class="LineNr"> 192 </span> *op <span class="Special"><-</span> merge <span class="Constant">0/insert-operation</span>, cursor-row-before, cursor-column-before, top-before, cursor-row/after, cursor-column/after, top-after, insert-from, insert-to, <span class="Constant">0/never-coalesce</span> <span id="L193" class="LineNr"> 193 </span> editor <span class="Special"><-</span> <a href='012-editor-undo.mu.html#L200'>add-operation</a> editor, op @@ -263,10 +263,10 @@ if ('onhashchange' in window) { <span id="L200" class="LineNr"> 200 </span><span class="muRecipe">def</span> <a href='012-editor-undo.mu.html#L200'>add-operation</a> editor:&:editor, op:&:<a href='012-editor-undo.mu.html#L5'>operation</a><span class="muRecipe"> -> </span>editor:&:editor [ <span id="L201" class="LineNr"> 201 </span> <span class="Constant">local-scope</span> <span id="L202" class="LineNr"> 202 </span> <span class="Constant">load-ingredients</span> -<span id="L203" class="LineNr"> 203 </span> undo:&:list:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> get *editor, <span class="Constant">undo:offset</span> +<span id="L203" class="LineNr"> 203 </span> undo:&:<a href='../064list.mu.html#L6'>list</a>:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> get *editor, <span class="Constant">undo:offset</span> <span id="L204" class="LineNr"> 204 </span> undo <span class="Special"><-</span> push op undo <span id="L205" class="LineNr"> 205 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">undo:offset</span>, undo -<span id="L206" class="LineNr"> 206 </span> redo:&:list:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> get *editor, <span class="Constant">redo:offset</span> +<span id="L206" class="LineNr"> 206 </span> redo:&:<a href='../064list.mu.html#L6'>list</a>:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> get *editor, <span class="Constant">redo:offset</span> <span id="L207" class="LineNr"> 207 </span> redo <span class="Special"><-</span> copy<span class="Constant"> 0</span> <span id="L208" class="LineNr"> 208 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">redo:offset</span>, redo <span id="L209" class="LineNr"> 209 </span>] @@ -275,17 +275,17 @@ if ('onhashchange' in window) { <span id="L212" class="LineNr"> 212 </span> <span class="Delimiter">{</span> <span id="L213" class="LineNr"> 213 </span> <span class="Conceal">¦</span> typing:<a href='012-editor-undo.mu.html#L11'>insert-operation</a>, is-insert?:bool <span class="Special"><-</span> maybe-convert *op, <span class="Constant">typing:variant</span> <span id="L214" class="LineNr"> 214 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> is-insert? -<span id="L215" class="LineNr"> 215 </span> <span class="Conceal">¦</span> start:&:duplex-list:char <span class="Special"><-</span> get typing, <span class="Constant">insert-from:offset</span> -<span id="L216" class="LineNr"> 216 </span> <span class="Conceal">¦</span> end:&:duplex-list:char <span class="Special"><-</span> get typing, <span class="Constant">insert-until:offset</span> +<span id="L215" class="LineNr"> 215 </span> <span class="Conceal">¦</span> start:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get typing, <span class="Constant">insert-from:offset</span> +<span id="L216" class="LineNr"> 216 </span> <span class="Conceal">¦</span> end:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get typing, <span class="Constant">insert-until:offset</span> <span id="L217" class="LineNr"> 217 </span> <span class="Conceal">¦</span> <span class="Comment"># assert cursor-row/cursor-column/top-of-screen match after-row/after-column/after-top-of-screen</span> -<span id="L218" class="LineNr"> 218 </span> <span class="Conceal">¦</span> before-cursor:&:duplex-list:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L36'>prev</a> start +<span id="L218" class="LineNr"> 218 </span> <span class="Conceal">¦</span> before-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L36'>prev</a> start <span id="L219" class="LineNr"> 219 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">before-cursor:offset</span>, before-cursor <span id="L220" class="LineNr"> 220 </span> <span class="Conceal">¦</span> <a href='../065duplex_list.mu.html#L357'>remove-between</a> before-cursor, end <span id="L221" class="LineNr"> 221 </span> <span class="Conceal">¦</span> cursor-row <span class="Special"><-</span> get typing, <span class="Constant">before-row:offset</span> <span id="L222" class="LineNr"> 222 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-row:offset</span>, cursor-row <span id="L223" class="LineNr"> 223 </span> <span class="Conceal">¦</span> cursor-column <span class="Special"><-</span> get typing, <span class="Constant">before-column:offset</span> <span id="L224" class="LineNr"> 224 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-column:offset</span>, cursor-column -<span id="L225" class="LineNr"> 225 </span> <span class="Conceal">¦</span> top:&:duplex-list:char <span class="Special"><-</span> get typing, <span class="Constant">before-top-of-screen:offset</span> +<span id="L225" class="LineNr"> 225 </span> <span class="Conceal">¦</span> top:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get typing, <span class="Constant">before-top-of-screen:offset</span> <span id="L226" class="LineNr"> 226 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">top-of-screen:offset</span>, top <span id="L227" class="LineNr"> 227 </span> <span class="Delimiter">}</span> <span id="L228" class="LineNr"> 228 </span>] @@ -476,7 +476,7 @@ if ('onhashchange' in window) { <span id="L413" class="LineNr"> 413 </span> <span class="Conceal">¦</span> typing:<a href='012-editor-undo.mu.html#L11'>insert-operation</a>, is-insert?:bool <span class="Special"><-</span> maybe-convert *op, <span class="Constant">typing:variant</span> <span id="L414" class="LineNr"> 414 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> is-insert? <span id="L415" class="LineNr"> 415 </span> <span class="Conceal">¦</span> before-cursor <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> -<span id="L416" class="LineNr"> 416 </span> <span class="Conceal">¦</span> insert-from:&:duplex-list:char <span class="Special"><-</span> get typing, <span class="Constant">insert-from:offset</span> <span class="Comment"># ignore insert-to because it's already been spliced away</span> +<span id="L416" class="LineNr"> 416 </span> <span class="Conceal">¦</span> insert-from:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get typing, <span class="Constant">insert-from:offset</span> <span class="Comment"># ignore insert-to because it's already been spliced away</span> <span id="L417" class="LineNr"> 417 </span> <span class="Conceal">¦</span> <span class="Comment"># assert insert-to matches next(before-cursor)</span> <span id="L418" class="LineNr"> 418 </span> <span class="Conceal">¦</span> <a href='../065duplex_list.mu.html#L497'>insert-range</a> before-cursor, insert-from <span id="L419" class="LineNr"> 419 </span> <span class="Conceal">¦</span> <span class="Comment"># assert cursor-row/cursor-column/top-of-screen match after-row/after-column/after-top-of-screen</span> @@ -484,7 +484,7 @@ if ('onhashchange' in window) { <span id="L421" class="LineNr"> 421 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-row:offset</span>, cursor-row <span id="L422" class="LineNr"> 422 </span> <span class="Conceal">¦</span> cursor-column <span class="Special"><-</span> get typing, <span class="Constant">after-column:offset</span> <span id="L423" class="LineNr"> 423 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-column:offset</span>, cursor-column -<span id="L424" class="LineNr"> 424 </span> <span class="Conceal">¦</span> top:&:duplex-list:char <span class="Special"><-</span> get typing, <span class="Constant">after-top-of-screen:offset</span> +<span id="L424" class="LineNr"> 424 </span> <span class="Conceal">¦</span> top:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get typing, <span class="Constant">after-top-of-screen:offset</span> <span id="L425" class="LineNr"> 425 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">top-of-screen:offset</span>, top <span id="L426" class="LineNr"> 426 </span> <span class="Delimiter">}</span> <span id="L427" class="LineNr"> 427 </span>] @@ -782,17 +782,17 @@ if ('onhashchange' in window) { <span id="L719" class="LineNr"> 719 </span><span class="muRecipe">after</span> <span class="Constant"><move-cursor-begin></span> [ <span id="L720" class="LineNr"> 720 </span> cursor-row-before:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-row:offset</span> <span id="L721" class="LineNr"> 721 </span> cursor-column-before:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-column:offset</span> -<span id="L722" class="LineNr"> 722 </span> top-before:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> +<span id="L722" class="LineNr"> 722 </span> top-before:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L723" class="LineNr"> 723 </span>] <span id="L724" class="LineNr"> 724 </span><span class="muRecipe">before</span> <span class="Constant"><move-cursor-end></span> [ -<span id="L725" class="LineNr"> 725 </span> top-after:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> +<span id="L725" class="LineNr"> 725 </span> top-after:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L726" class="LineNr"> 726 </span> cursor-row:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-row:offset</span> <span id="L727" class="LineNr"> 727 </span> cursor-column:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-column:offset</span> <span id="L728" class="LineNr"> 728 </span> <span class="Delimiter">{</span> <span id="L729" class="LineNr"> 729 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> undo-coalesce-tag <span id="L730" class="LineNr"> 730 </span> <span class="Conceal">¦</span> <span class="Comment"># if previous operation was also a move, and also had the same coalesce</span> <span id="L731" class="LineNr"> 731 </span> <span class="Conceal">¦</span> <span class="Comment"># tag, coalesce with it</span> -<span id="L732" class="LineNr"> 732 </span> <span class="Conceal">¦</span> undo:&:list:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> get *editor, <span class="Constant">undo:offset</span> +<span id="L732" class="LineNr"> 732 </span> <span class="Conceal">¦</span> undo:&:<a href='../064list.mu.html#L6'>list</a>:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> get *editor, <span class="Constant">undo:offset</span> <span id="L733" class="LineNr"> 733 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> undo <span id="L734" class="LineNr"> 734 </span> <span class="Conceal">¦</span> op:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> first undo <span id="L735" class="LineNr"> 735 </span> <span class="Conceal">¦</span> move:<a href='012-editor-undo.mu.html#L26'>move-operation</a>, is-move?:bool <span class="Special"><-</span> maybe-convert *op, <span class="Constant">move:variant</span> @@ -821,7 +821,7 @@ if ('onhashchange' in window) { <span id="L758" class="LineNr"> 758 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-row:offset</span>, cursor-row <span id="L759" class="LineNr"> 759 </span> <span class="Conceal">¦</span> cursor-column <span class="Special"><-</span> get move, <span class="Constant">before-column:offset</span> <span id="L760" class="LineNr"> 760 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-column:offset</span>, cursor-column -<span id="L761" class="LineNr"> 761 </span> <span class="Conceal">¦</span> top:&:duplex-list:char <span class="Special"><-</span> get move, <span class="Constant">before-top-of-screen:offset</span> +<span id="L761" class="LineNr"> 761 </span> <span class="Conceal">¦</span> top:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get move, <span class="Constant">before-top-of-screen:offset</span> <span id="L762" class="LineNr"> 762 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">top-of-screen:offset</span>, top <span id="L763" class="LineNr"> 763 </span> <span class="Delimiter">}</span> <span id="L764" class="LineNr"> 764 </span>] @@ -1457,7 +1457,7 @@ if ('onhashchange' in window) { <span id="L1394" class="LineNr">1394 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-row:offset</span>, cursor-row <span id="L1395" class="LineNr">1395 </span> <span class="Conceal">¦</span> cursor-column <span class="Special"><-</span> get move, <span class="Constant">after-column:offset</span> <span id="L1396" class="LineNr">1396 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-column:offset</span>, cursor-column -<span id="L1397" class="LineNr">1397 </span> <span class="Conceal">¦</span> top:&:duplex-list:char <span class="Special"><-</span> get move, <span class="Constant">after-top-of-screen:offset</span> +<span id="L1397" class="LineNr">1397 </span> <span class="Conceal">¦</span> top:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get move, <span class="Constant">after-top-of-screen:offset</span> <span id="L1398" class="LineNr">1398 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">top-of-screen:offset</span>, top <span id="L1399" class="LineNr">1399 </span> <span class="Delimiter">}</span> <span id="L1400" class="LineNr">1400 </span>] @@ -1678,16 +1678,16 @@ if ('onhashchange' in window) { <span id="L1615" class="LineNr">1615 </span> <span id="L1616" class="LineNr">1616 </span><span class="Comment"># save operation to undo</span> <span id="L1617" class="LineNr">1617 </span><span class="muRecipe">after</span> <span class="Constant"><a href='003-shortcuts.mu.html#L73'><backspace-character-begin></a></span> [ -<span id="L1618" class="LineNr">1618 </span> top-before:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> +<span id="L1618" class="LineNr">1618 </span> top-before:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L1619" class="LineNr">1619 </span>] <span id="L1620" class="LineNr">1620 </span><span class="muRecipe">before</span> <span class="Constant"><a href='003-shortcuts.mu.html#L75'><backspace-character-end></a></span> [ <span id="L1621" class="LineNr">1621 </span> <span class="Delimiter">{</span> <span id="L1622" class="LineNr">1622 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> backspaced-cell <span class="Comment"># backspace failed; don't add an undo operation</span> -<span id="L1623" class="LineNr">1623 </span> <span class="Conceal">¦</span> top-after:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> +<span id="L1623" class="LineNr">1623 </span> <span class="Conceal">¦</span> top-after:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L1624" class="LineNr">1624 </span> <span class="Conceal">¦</span> cursor-row:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-row:offset</span> <span id="L1625" class="LineNr">1625 </span> <span class="Conceal">¦</span> cursor-column:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-row:offset</span> -<span id="L1626" class="LineNr">1626 </span> <span class="Conceal">¦</span> before-cursor:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> -<span id="L1627" class="LineNr">1627 </span> <span class="Conceal">¦</span> undo:&:list:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> get *editor, <span class="Constant">undo:offset</span> +<span id="L1626" class="LineNr">1626 </span> <span class="Conceal">¦</span> before-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> +<span id="L1627" class="LineNr">1627 </span> <span class="Conceal">¦</span> undo:&:<a href='../064list.mu.html#L6'>list</a>:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> get *editor, <span class="Constant">undo:offset</span> <span id="L1628" class="LineNr">1628 </span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> <span id="L1629" class="LineNr">1629 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Comment"># if previous operation was an insert, coalesce this operation with it</span> <span id="L1630" class="LineNr">1630 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> undo @@ -1698,7 +1698,7 @@ if ('onhashchange' in window) { <span id="L1635" class="LineNr">1635 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> coalesce?:bool <span class="Special"><-</span> equal previous-coalesce-tag, <span class="Constant">1/coalesce-backspace</span> <span id="L1636" class="LineNr">1636 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> coalesce? <span id="L1637" class="LineNr">1637 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> deletion <span class="Special"><-</span> put deletion, <span class="Constant">delete-from:offset</span>, before-cursor -<span id="L1638" class="LineNr">1638 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> backspaced-so-far:&:duplex-list:char <span class="Special"><-</span> get deletion, <span class="Constant">deleted-text:offset</span> +<span id="L1638" class="LineNr">1638 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> backspaced-so-far:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get deletion, <span class="Constant">deleted-text:offset</span> <span id="L1639" class="LineNr">1639 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='../065duplex_list.mu.html#L497'>insert-range</a> backspaced-cell, backspaced-so-far <span id="L1640" class="LineNr">1640 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> deletion <span class="Special"><-</span> put deletion, <span class="Constant">deleted-text:offset</span>, backspaced-cell <span id="L1641" class="LineNr">1641 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> deletion <span class="Special"><-</span> put deletion, <span class="Constant">after-row:offset</span>, cursor-row @@ -1709,7 +1709,7 @@ if ('onhashchange' in window) { <span id="L1646" class="LineNr">1646 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L1647" class="LineNr">1647 </span> <span class="Conceal">¦</span> <span class="Comment"># if not, create a new operation</span> <span id="L1648" class="LineNr">1648 </span> <span class="Conceal">¦</span> op:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> new <span class="Constant"><a href='012-editor-undo.mu.html#L5'>operation</a>:type</span> -<span id="L1649" class="LineNr">1649 </span> <span class="Conceal">¦</span> deleted-until:&:duplex-list:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L29'>next</a> before-cursor +<span id="L1649" class="LineNr">1649 </span> <span class="Conceal">¦</span> deleted-until:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L29'>next</a> before-cursor <span id="L1650" class="LineNr">1650 </span> <span class="Conceal">¦</span> *op <span class="Special"><-</span> merge <span class="Constant">2/delete-operation</span>, save-row/before, save-column/before, top-before, cursor-row/after, cursor-column/after, top-after, backspaced-cell/deleted, before-cursor/delete-from, deleted-until, <span class="Constant">1/coalesce-backspace</span> <span id="L1651" class="LineNr">1651 </span> <span class="Conceal">¦</span> editor <span class="Special"><-</span> <a href='012-editor-undo.mu.html#L200'>add-operation</a> editor, op <span id="L1652" class="LineNr">1652 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> +done-adding-backspace-operation</span> @@ -1720,10 +1720,10 @@ if ('onhashchange' in window) { <span id="L1657" class="LineNr">1657 </span> <span class="Delimiter">{</span> <span id="L1658" class="LineNr">1658 </span> <span class="Conceal">¦</span> deletion:<a href='012-editor-undo.mu.html#L41'>delete-operation</a>, is-delete?:bool <span class="Special"><-</span> maybe-convert *op, <span class="Constant">delete:variant</span> <span id="L1659" class="LineNr">1659 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> is-delete? -<span id="L1660" class="LineNr">1660 </span> <span class="Conceal">¦</span> anchor:&:duplex-list:char <span class="Special"><-</span> get deletion, <span class="Constant">delete-from:offset</span> +<span id="L1660" class="LineNr">1660 </span> <span class="Conceal">¦</span> anchor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get deletion, <span class="Constant">delete-from:offset</span> <span id="L1661" class="LineNr">1661 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> anchor -<span id="L1662" class="LineNr">1662 </span> <span class="Conceal">¦</span> deleted:&:duplex-list:char <span class="Special"><-</span> get deletion, <span class="Constant">deleted-text:offset</span> -<span id="L1663" class="LineNr">1663 </span> <span class="Conceal">¦</span> old-cursor:&:duplex-list:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L528'>last</a> deleted +<span id="L1662" class="LineNr">1662 </span> <span class="Conceal">¦</span> deleted:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get deletion, <span class="Constant">deleted-text:offset</span> +<span id="L1663" class="LineNr">1663 </span> <span class="Conceal">¦</span> old-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L528'>last</a> deleted <span id="L1664" class="LineNr">1664 </span> <span class="Conceal">¦</span> <a href='../065duplex_list.mu.html#L497'>insert-range</a> anchor, deleted <span id="L1665" class="LineNr">1665 </span> <span class="Conceal">¦</span> <span class="Comment"># assert cursor-row/cursor-column/top-of-screen match after-row/after-column/after-top-of-screen</span> <span id="L1666" class="LineNr">1666 </span> <span class="Conceal">¦</span> before-cursor <span class="Special"><-</span> copy old-cursor @@ -1731,7 +1731,7 @@ if ('onhashchange' in window) { <span id="L1668" class="LineNr">1668 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-row:offset</span>, cursor-row <span id="L1669" class="LineNr">1669 </span> <span class="Conceal">¦</span> cursor-column <span class="Special"><-</span> get deletion, <span class="Constant">before-column:offset</span> <span id="L1670" class="LineNr">1670 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-column:offset</span>, cursor-column -<span id="L1671" class="LineNr">1671 </span> <span class="Conceal">¦</span> top:&:duplex-list:char <span class="Special"><-</span> get deletion, <span class="Constant">before-top-of-screen:offset</span> +<span id="L1671" class="LineNr">1671 </span> <span class="Conceal">¦</span> top:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get deletion, <span class="Constant">before-top-of-screen:offset</span> <span id="L1672" class="LineNr">1672 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">top-of-screen:offset</span>, top <span id="L1673" class="LineNr">1673 </span> <span class="Delimiter">}</span> <span id="L1674" class="LineNr">1674 </span>] @@ -1740,16 +1740,16 @@ if ('onhashchange' in window) { <span id="L1677" class="LineNr">1677 </span> <span class="Delimiter">{</span> <span id="L1678" class="LineNr">1678 </span> <span class="Conceal">¦</span> deletion:<a href='012-editor-undo.mu.html#L41'>delete-operation</a>, is-delete?:bool <span class="Special"><-</span> maybe-convert *op, <span class="Constant">delete:variant</span> <span id="L1679" class="LineNr">1679 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> is-delete? -<span id="L1680" class="LineNr">1680 </span> <span class="Conceal">¦</span> start:&:duplex-list:char <span class="Special"><-</span> get deletion, <span class="Constant">delete-from:offset</span> -<span id="L1681" class="LineNr">1681 </span> <span class="Conceal">¦</span> end:&:duplex-list:char <span class="Special"><-</span> get deletion, <span class="Constant">delete-until:offset</span> -<span id="L1682" class="LineNr">1682 </span> <span class="Conceal">¦</span> data:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">data:offset</span> +<span id="L1680" class="LineNr">1680 </span> <span class="Conceal">¦</span> start:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get deletion, <span class="Constant">delete-from:offset</span> +<span id="L1681" class="LineNr">1681 </span> <span class="Conceal">¦</span> end:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get deletion, <span class="Constant">delete-until:offset</span> +<span id="L1682" class="LineNr">1682 </span> <span class="Conceal">¦</span> data:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">data:offset</span> <span id="L1683" class="LineNr">1683 </span> <span class="Conceal">¦</span> <a href='../065duplex_list.mu.html#L357'>remove-between</a> start, end <span id="L1684" class="LineNr">1684 </span> <span class="Conceal">¦</span> <span class="Comment"># assert cursor-row/cursor-column/top-of-screen match after-row/after-column/after-top-of-screen</span> <span id="L1685" class="LineNr">1685 </span> <span class="Conceal">¦</span> cursor-row <span class="Special"><-</span> get deletion, <span class="Constant">after-row:offset</span> <span id="L1686" class="LineNr">1686 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-row:offset</span>, cursor-row <span id="L1687" class="LineNr">1687 </span> <span class="Conceal">¦</span> cursor-column <span class="Special"><-</span> get deletion, <span class="Constant">after-column:offset</span> <span id="L1688" class="LineNr">1688 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-column:offset</span>, cursor-column -<span id="L1689" class="LineNr">1689 </span> <span class="Conceal">¦</span> top:&:duplex-list:char <span class="Special"><-</span> get deletion, <span class="Constant">before-top-of-screen:offset</span> +<span id="L1689" class="LineNr">1689 </span> <span class="Conceal">¦</span> top:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get deletion, <span class="Constant">before-top-of-screen:offset</span> <span id="L1690" class="LineNr">1690 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">top-of-screen:offset</span>, top <span id="L1691" class="LineNr">1691 </span> <span class="Delimiter">}</span> <span id="L1692" class="LineNr">1692 </span>] @@ -1904,16 +1904,16 @@ if ('onhashchange' in window) { <span id="L1841" class="LineNr">1841 </span>] <span id="L1842" class="LineNr">1842 </span> <span id="L1843" class="LineNr">1843 </span><span class="muRecipe">after</span> <span class="Constant"><a href='003-shortcuts.mu.html#L341'><delete-character-begin></a></span> [ -<span id="L1844" class="LineNr">1844 </span> top-before:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> +<span id="L1844" class="LineNr">1844 </span> top-before:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L1845" class="LineNr">1845 </span>] <span id="L1846" class="LineNr">1846 </span><span class="muRecipe">before</span> <span class="Constant"><a href='003-shortcuts.mu.html#L343'><delete-character-end></a></span> [ <span id="L1847" class="LineNr">1847 </span> <span class="Delimiter">{</span> <span id="L1848" class="LineNr">1848 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> deleted-cell <span class="Comment"># delete failed; don't add an undo operation</span> -<span id="L1849" class="LineNr">1849 </span> <span class="Conceal">¦</span> top-after:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> +<span id="L1849" class="LineNr">1849 </span> <span class="Conceal">¦</span> top-after:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L1850" class="LineNr">1850 </span> <span class="Conceal">¦</span> cursor-row:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-row:offset</span> <span id="L1851" class="LineNr">1851 </span> <span class="Conceal">¦</span> cursor-column:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-column:offset</span> -<span id="L1852" class="LineNr">1852 </span> <span class="Conceal">¦</span> before-cursor:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> -<span id="L1853" class="LineNr">1853 </span> <span class="Conceal">¦</span> undo:&:list:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> get *editor, <span class="Constant">undo:offset</span> +<span id="L1852" class="LineNr">1852 </span> <span class="Conceal">¦</span> before-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> +<span id="L1853" class="LineNr">1853 </span> <span class="Conceal">¦</span> undo:&:<a href='../064list.mu.html#L6'>list</a>:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> get *editor, <span class="Constant">undo:offset</span> <span id="L1854" class="LineNr">1854 </span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> <span id="L1855" class="LineNr">1855 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Comment"># if previous operation was an insert, coalesce this operation with it</span> <span id="L1856" class="LineNr">1856 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> undo @@ -1923,9 +1923,9 @@ if ('onhashchange' in window) { <span id="L1860" class="LineNr">1860 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> previous-coalesce-tag:num <span class="Special"><-</span> get deletion, <span class="Constant">tag:offset</span> <span id="L1861" class="LineNr">1861 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> coalesce?:bool <span class="Special"><-</span> equal previous-coalesce-tag, <span class="Constant">2/coalesce-delete</span> <span id="L1862" class="LineNr">1862 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> coalesce? -<span id="L1863" class="LineNr">1863 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> delete-until:&:duplex-list:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L29'>next</a> before-cursor +<span id="L1863" class="LineNr">1863 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> delete-until:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L29'>next</a> before-cursor <span id="L1864" class="LineNr">1864 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> deletion <span class="Special"><-</span> put deletion, <span class="Constant">delete-until:offset</span>, delete-until -<span id="L1865" class="LineNr">1865 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> deleted-so-far:&:duplex-list:char <span class="Special"><-</span> get deletion, <span class="Constant">deleted-text:offset</span> +<span id="L1865" class="LineNr">1865 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> deleted-so-far:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get deletion, <span class="Constant">deleted-text:offset</span> <span id="L1866" class="LineNr">1866 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> deleted-so-far <span class="Special"><-</span> append deleted-so-far, deleted-cell <span id="L1867" class="LineNr">1867 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> deletion <span class="Special"><-</span> put deletion, <span class="Constant">deleted-text:offset</span>, deleted-so-far <span id="L1868" class="LineNr">1868 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> deletion <span class="Special"><-</span> put deletion, <span class="Constant">after-row:offset</span>, cursor-row @@ -1936,7 +1936,7 @@ if ('onhashchange' in window) { <span id="L1873" class="LineNr">1873 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L1874" class="LineNr">1874 </span> <span class="Conceal">¦</span> <span class="Comment"># if not, create a new operation</span> <span id="L1875" class="LineNr">1875 </span> <span class="Conceal">¦</span> op:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> new <span class="Constant"><a href='012-editor-undo.mu.html#L5'>operation</a>:type</span> -<span id="L1876" class="LineNr">1876 </span> <span class="Conceal">¦</span> deleted-until:&:duplex-list:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L29'>next</a> before-cursor +<span id="L1876" class="LineNr">1876 </span> <span class="Conceal">¦</span> deleted-until:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L29'>next</a> before-cursor <span id="L1877" class="LineNr">1877 </span> <span class="Conceal">¦</span> *op <span class="Special"><-</span> merge <span class="Constant">2/delete-operation</span>, save-row/before, save-column/before, top-before, cursor-row/after, cursor-column/after, top-after, deleted-cell/deleted, before-cursor/delete-from, deleted-until, <span class="Constant">2/coalesce-delete</span> <span id="L1878" class="LineNr">1878 </span> <span class="Conceal">¦</span> editor <span class="Special"><-</span> <a href='012-editor-undo.mu.html#L200'>add-operation</a> editor, op <span id="L1879" class="LineNr">1879 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> +done-adding-delete-operation</span> @@ -2030,15 +2030,15 @@ if ('onhashchange' in window) { <span id="L1967" class="LineNr">1967 </span>] <span id="L1968" class="LineNr">1968 </span> <span id="L1969" class="LineNr">1969 </span><span class="muRecipe">after</span> <span class="Constant"><a href='003-shortcuts.mu.html#L1789'><delete-to-end-of-line-begin></a></span> [ -<span id="L1970" class="LineNr">1970 </span> top-before:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> +<span id="L1970" class="LineNr">1970 </span> top-before:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L1971" class="LineNr">1971 </span>] <span id="L1972" class="LineNr">1972 </span><span class="muRecipe">before</span> <span class="Constant"><a href='003-shortcuts.mu.html#L1791'><delete-to-end-of-line-end></a></span> [ <span id="L1973" class="LineNr">1973 </span> <span class="Delimiter">{</span> <span id="L1974" class="LineNr">1974 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> deleted-cells <span class="Comment"># delete failed; don't add an undo operation</span> -<span id="L1975" class="LineNr">1975 </span> <span class="Conceal">¦</span> top-after:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> +<span id="L1975" class="LineNr">1975 </span> <span class="Conceal">¦</span> top-after:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L1976" class="LineNr">1976 </span> <span class="Conceal">¦</span> cursor-row:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-row:offset</span> <span id="L1977" class="LineNr">1977 </span> <span class="Conceal">¦</span> cursor-column:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-column:offset</span> -<span id="L1978" class="LineNr">1978 </span> <span class="Conceal">¦</span> deleted-until:&:duplex-list:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L29'>next</a> before-cursor +<span id="L1978" class="LineNr">1978 </span> <span class="Conceal">¦</span> deleted-until:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L29'>next</a> before-cursor <span id="L1979" class="LineNr">1979 </span> <span class="Conceal">¦</span> op:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> new <span class="Constant"><a href='012-editor-undo.mu.html#L5'>operation</a>:type</span> <span id="L1980" class="LineNr">1980 </span> <span class="Conceal">¦</span> *op <span class="Special"><-</span> merge <span class="Constant">2/delete-operation</span>, save-row/before, save-column/before, top-before, cursor-row/after, cursor-column/after, top-after, deleted-cells/deleted, before-cursor/delete-from, deleted-until, <span class="Constant">0/never-coalesce</span> <span id="L1981" class="LineNr">1981 </span> <span class="Conceal">¦</span> editor <span class="Special"><-</span> <a href='012-editor-undo.mu.html#L200'>add-operation</a> editor, op @@ -2133,15 +2133,15 @@ if ('onhashchange' in window) { <span id="L2070" class="LineNr">2070 </span>] <span id="L2071" class="LineNr">2071 </span> <span id="L2072" class="LineNr">2072 </span><span class="muRecipe">after</span> <span class="Constant"><a href='003-shortcuts.mu.html#L1652'><delete-to-start-of-line-begin></a></span> [ -<span id="L2073" class="LineNr">2073 </span> top-before:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> +<span id="L2073" class="LineNr">2073 </span> top-before:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L2074" class="LineNr">2074 </span>] <span id="L2075" class="LineNr">2075 </span><span class="muRecipe">before</span> <span class="Constant"><a href='003-shortcuts.mu.html#L1654'><delete-to-start-of-line-end></a></span> [ <span id="L2076" class="LineNr">2076 </span> <span class="Delimiter">{</span> <span id="L2077" class="LineNr">2077 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> deleted-cells <span class="Comment"># delete failed; don't add an undo operation</span> -<span id="L2078" class="LineNr">2078 </span> <span class="Conceal">¦</span> top-after:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> +<span id="L2078" class="LineNr">2078 </span> <span class="Conceal">¦</span> top-after:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L2079" class="LineNr">2079 </span> <span class="Conceal">¦</span> op:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> new <span class="Constant"><a href='012-editor-undo.mu.html#L5'>operation</a>:type</span> -<span id="L2080" class="LineNr">2080 </span> <span class="Conceal">¦</span> before-cursor:&:duplex-list:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> -<span id="L2081" class="LineNr">2081 </span> <span class="Conceal">¦</span> deleted-until:&:duplex-list:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L29'>next</a> before-cursor +<span id="L2080" class="LineNr">2080 </span> <span class="Conceal">¦</span> before-cursor:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">before-cursor:offset</span> +<span id="L2081" class="LineNr">2081 </span> <span class="Conceal">¦</span> deleted-until:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L29'>next</a> before-cursor <span id="L2082" class="LineNr">2082 </span> <span class="Conceal">¦</span> cursor-row:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-row:offset</span> <span id="L2083" class="LineNr">2083 </span> <span class="Conceal">¦</span> cursor-column:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-column:offset</span> <span id="L2084" class="LineNr">2084 </span> <span class="Conceal">¦</span> *op <span class="Special"><-</span> merge <span class="Constant">2/delete-operation</span>, save-row/before, save-column/before, top-before, cursor-row/after, cursor-column/after, top-after, deleted-cells/deleted, before-cursor/delete-from, deleted-until, <span class="Constant">0/never-coalesce</span> |