From eeed3845cd504028779c333665e0b9fad2070357 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 6 Oct 2016 21:49:36 -0700 Subject: 3456 --- html/edit/002-typing.mu.html | 102 +++++++++++++++++++++---------------------- 1 file changed, 51 insertions(+), 51 deletions(-) (limited to 'html/edit/002-typing.mu.html') diff --git a/html/edit/002-typing.mu.html b/html/edit/002-typing.mu.html index e8d68e3f..c2c0efb5 100644 --- a/html/edit/002-typing.mu.html +++ b/html/edit/002-typing.mu.html @@ -55,7 +55,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color cursor-row:num <- get *editor, cursor-row:offset cursor-column:num <- get *editor, cursor-column:offset screen <- move-cursor screen, cursor-row, cursor-column - e:event, console:&:console, found?:bool, quit?:bool <- read-event console + e:event, console, found?:bool, quit?:bool <- read-event console loop-unless found? break-if quit? # only in tests trace 10, [app], [next-event] @@ -318,11 +318,11 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color scenario editor-handles-empty-event-queue [ local-scope assume-screen 10/width, 5/height - e:&:editor <- new-editor [abc], screen:&:screen, 0/left, 10/right + e:&:editor <- new-editor [abc], screen, 0/left, 10/right editor-render screen, e assume-console [] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -335,14 +335,14 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color scenario editor-handles-mouse-clicks [ local-scope assume-screen 10/width, 5/height - e:&:editor <- new-editor [abc], screen:&:screen, 0/left, 10/right + e:&:editor <- new-editor [abc], screen, 0/left, 10/right editor-render screen, e $clear-trace assume-console [ left-click 1, 1 # on the 'b' ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e 3:num/raw <- get *e, cursor-row:offset 4:num/raw <- get *e, cursor-column:offset ] @@ -362,13 +362,13 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color scenario editor-handles-mouse-clicks-outside-text [ local-scope assume-screen 10/width, 5/height - e:&:editor <- new-editor [abc], screen:&:screen, 0/left, 10/right + e:&:editor <- new-editor [abc], screen, 0/left, 10/right $clear-trace assume-console [ left-click 1, 7 # last line, to the right of text ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e 3:num/raw <- get *e, cursor-row:offset 4:num/raw <- get *e, cursor-column:offset ] @@ -384,13 +384,13 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color assume-screen 10/width, 5/height s:text <- new [abc def] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 10/right + e:&:editor <- new-editor s, screen, 0/left, 10/right $clear-trace assume-console [ left-click 1, 7 # interior line, to the right of text ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e 3:num/raw <- get *e, cursor-row:offset 4:num/raw <- get *e, cursor-column:offset ] @@ -406,13 +406,13 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color assume-screen 10/width, 5/height s:text <- new [abc def] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 10/right + e:&:editor <- new-editor s, screen, 0/left, 10/right $clear-trace assume-console [ left-click 3, 7 # below text ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e 3:num/raw <- get *e, cursor-row:offset 4:num/raw <- get *e, cursor-column:offset ] @@ -427,7 +427,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color local-scope assume-screen 10/width, 5/height # editor occupies only left half of screen - e:&:editor <- new-editor [abc], screen:&:screen, 0/left, 5/right + e:&:editor <- new-editor [abc], screen, 0/left, 5/right editor-render screen, e $clear-trace assume-console [ @@ -435,7 +435,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color left-click 3, 8 ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e 3:num/raw <- get *e, cursor-row:offset 4:num/raw <- get *e, cursor-column:offset ] @@ -455,7 +455,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color scenario editor-handles-mouse-clicks-in-menu-area [ local-scope assume-screen 10/width, 5/height - e:&:editor <- new-editor [abc], screen:&:screen, 0/left, 5/right + e:&:editor <- new-editor [abc], screen, 0/left, 5/right editor-render screen, e $clear-trace assume-console [ @@ -463,7 +463,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color left-click 0, 3 ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e 3:num/raw <- get *e, cursor-row:offset 4:num/raw <- get *e, cursor-column:offset ] @@ -477,14 +477,14 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color scenario editor-inserts-characters-into-empty-editor [ local-scope assume-screen 10/width, 5/height - e:&:editor <- new-editor [], screen:&:screen, 0/left, 5/right + e:&:editor <- new-editor [], screen, 0/left, 5/right editor-render screen, e $clear-trace assume-console [ type [abc] ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -498,7 +498,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color scenario editor-inserts-characters-at-cursor [ local-scope assume-screen 10/width, 5/height - e:&:editor <- new-editor [abc], screen:&:screen, 0/left, 10/right + e:&:editor <- new-editor [abc], screen, 0/left, 10/right editor-render screen, e $clear-trace # type two letters at different places @@ -508,7 +508,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color type [d] ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -522,7 +522,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color scenario editor-inserts-characters-at-cursor-2 [ local-scope assume-screen 10/width, 5/height - e:&:editor <- new-editor [abc], screen:&:screen, 0/left, 10/right + e:&:editor <- new-editor [abc], screen, 0/left, 10/right editor-render screen, e $clear-trace assume-console [ @@ -530,7 +530,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color type [d] ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -546,7 +546,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color assume-screen 10/width, 5/height s:text <- new [abc d] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 10/right + e:&:editor <- new-editor s, screen, 0/left, 10/right editor-render screen, e $clear-trace assume-console [ @@ -554,7 +554,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color type [e] ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -569,7 +569,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color scenario editor-inserts-characters-at-cursor-3 [ local-scope assume-screen 10/width, 5/height - e:&:editor <- new-editor [abc], screen:&:screen, 0/left, 10/right + e:&:editor <- new-editor [abc], screen, 0/left, 10/right editor-render screen, e $clear-trace assume-console [ @@ -577,7 +577,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color type [d] ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -593,7 +593,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color assume-screen 10/width, 5/height s:text <- new [abc d] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 10/right + e:&:editor <- new-editor s, screen, 0/left, 10/right editor-render screen, e $clear-trace assume-console [ @@ -601,7 +601,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color type [e] ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -618,7 +618,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color assume-screen 10/width, 5/height s:text <- new [abc d] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 10/right + e:&:editor <- new-editor s, screen, 0/left, 10/right editor-render screen, e $clear-trace assume-console [ @@ -626,7 +626,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color type [ef] ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -641,13 +641,13 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color scenario editor-moves-cursor-after-inserting-characters [ local-scope assume-screen 10/width, 5/height - e:&:editor <- new-editor [ab], screen:&:screen, 0/left, 5/right + e:&:editor <- new-editor [ab], screen, 0/left, 5/right editor-render screen, e assume-console [ type [01] ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -662,14 +662,14 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color scenario editor-wraps-line-on-insert [ local-scope assume-screen 5/width, 5/height - e:&:editor <- new-editor [abc], screen:&:screen, 0/left, 5/right + e:&:editor <- new-editor [abc], screen, 0/left, 5/right editor-render screen, e # type a letter assume-console [ type [e] ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # no wrap yet screen-should-contain [ @@ -684,7 +684,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color type [f] ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # now wrap screen-should-contain [ @@ -702,7 +702,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color assume-screen 10/width, 5/height s:text <- new [abcdefg defg] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 5/right + e:&:editor <- new-editor s, screen, 0/left, 5/right editor-render screen, e # type more text at the start assume-console [ @@ -710,7 +710,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color type [abc] ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e 3:num/raw <- get *e, cursor-row:offset 4:num/raw <- get *e, cursor-column:offset ] @@ -783,13 +783,13 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color scenario editor-wraps-cursor-after-inserting-characters-in-middle-of-line [ local-scope assume-screen 10/width, 5/height - e:&:editor <- new-editor [abcde], screen:&:screen, 0/left, 5/right + e:&:editor <- new-editor [abcde], screen, 0/left, 5/right assume-console [ left-click 1, 3 # right before the wrap icon type [f] ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e 3:num/raw <- get *e, cursor-row:offset 4:num/raw <- get *e, cursor-column:offset ] @@ -824,7 +824,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color type [de] # trigger wrap ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -838,13 +838,13 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color scenario editor-wraps-cursor-to-left-margin [ local-scope assume-screen 10/width, 5/height - e:&:editor <- new-editor [abcde], screen:&:screen, 2/left, 7/right + e:&:editor <- new-editor [abcde], screen, 2/left, 7/right assume-console [ left-click 1, 5 # line is full; no wrap icon yet type [01] ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e 3:num/raw <- get *e, cursor-row:offset 4:num/raw <- get *e, cursor-column:offset ] @@ -874,13 +874,13 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color scenario editor-moves-cursor-down-after-inserting-newline [ local-scope assume-screen 10/width, 5/height - e:&:editor <- new-editor [abc], screen:&:screen, 0/left, 10/right + e:&:editor <- new-editor [abc], screen, 0/left, 10/right assume-console [ type [0 1] ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -980,13 +980,13 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color scenario editor-moves-cursor-down-after-inserting-newline-2 [ local-scope assume-screen 10/width, 5/height - e:&:editor <- new-editor [abc], screen:&:screen, 1/left, 10/right + e:&:editor <- new-editor [abc], screen, 1/left, 10/right assume-console [ type [0 1] ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -1000,7 +1000,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color scenario editor-clears-previous-line-completely-after-inserting-newline [ local-scope assume-screen 10/width, 5/height - e:&:editor <- new-editor [abcde], screen:&:screen, 0/left, 5/right + e:&:editor <- new-editor [abcde], screen, 0/left, 5/right assume-console [ press enter ] @@ -1012,7 +1012,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color . . ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # line should be fully cleared screen-should-contain [ @@ -1030,7 +1030,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color s:text <- new [ab cd ef] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 10/right + e:&:editor <- new-editor s, screen, 0/left, 10/right # position cursor after 'cd' and hit 'newline' assume-console [ left-click 2, 8 @@ -1038,7 +1038,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color ] ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e 3:num/raw <- get *e, cursor-row:offset 4:num/raw <- get *e, cursor-column:offset ] @@ -1055,7 +1055,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color s:text <- new [ab cd ef] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 10/right + e:&:editor <- new-editor s, screen, 0/left, 10/right # position cursor after 'cd' and hit 'newline' surrounded by paste markers assume-console [ left-click 2, 8 @@ -1064,7 +1064,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color press 65506 # end paste ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e 3:num/raw <- get *e, cursor-row:offset 4:num/raw <- get *e, cursor-column:offset ] -- cgit 1.4.1-2-gfad0