From 6c52e24e2996a77aa6297b26159003d503aef8a0 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 18 Apr 2017 11:33:33 -0700 Subject: 3830 - crosslink shape-shifting containers in html --- html/edit/001-editor.mu.html | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'html/edit/001-editor.mu.html') 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) { 29 30 container editor [ 31 # editable text: doubly linked list of characters (head contains a special sentinel) - 32 data:&:duplex-list:char - 33 top-of-screen:&:duplex-list:char - 34 bottom-of-screen:&:duplex-list:char + 32 data:&:duplex-list:char + 33 top-of-screen:&:duplex-list:char + 34 bottom-of-screen:&:duplex-list:char 35 # location before cursor inside data - 36 before-cursor:&:duplex-list:char + 36 before-cursor:&:duplex-list:char 37 38 # raw bounds of display area on screen 39 # always displays from row 1 (leaving row 0 for a menu) and at most until bottom of screen @@ -123,7 +123,7 @@ if ('onhashchange' in window) { 60 *result <- put *result, cursor-row:offset, 1/top 61 *result <- put *result, cursor-column:offset, left 62 # initialize empty contents - 63 init:&:duplex-list:char <- push 167/§, 0/tail + 63 init:&:duplex-list:char <- push 167/§, 0/tail 64 *result <- put *result, data:offset, init 65 *result <- put *result, top-of-screen:offset, init 66 *result <- put *result, before-cursor:offset, init @@ -140,7 +140,7 @@ if ('onhashchange' in window) { 77 return-unless len 78 idx:num <- copy 0 79 # now we can start appending the rest, character by character - 80 curr:&:duplex-list:char <- get *editor, data:offset + 80 curr:&:duplex-list:char <- get *editor, data:offset 81 { 82 ¦ done?:bool <- greater-or-equal idx, len 83 ¦ break-if done? @@ -189,8 +189,8 @@ if ('onhashchange' in window) { 126 screen-height:num <- screen-height screen 127 right:num <- get *editor, right:offset 128 # traversing editor -129 curr:&:duplex-list:char <- get *editor, top-of-screen:offset -130 prev:&:duplex-list:char <- copy curr # just in case curr becomes null and we can't compute prev +129 curr:&:duplex-list:char <- get *editor, top-of-screen:offset +130 prev:&:duplex-list:char <- copy curr # just in case curr becomes null and we can't compute prev 131 curr <- next curr 132 # traversing screen 133 color:num <- copy 7/white @@ -198,7 +198,7 @@ if ('onhashchange' in window) { 135 column:num <- copy left 136 cursor-row:num <- get *editor, cursor-row:offset 137 cursor-column:num <- get *editor, cursor-column:offset -138 before-cursor:&:duplex-list:char <- get *editor, before-cursor:offset +138 before-cursor:&:duplex-list:char <- get *editor, before-cursor:offset 139 screen <- move-cursor screen, row, column 140 { 141 ¦ +next-character -- cgit 1.4.1-2-gfad0