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/003-shortcuts.mu.html | 348 ++++++++++++++++++++-------------------- 1 file changed, 174 insertions(+), 174 deletions(-) (limited to 'html/edit/003-shortcuts.mu.html') diff --git a/html/edit/003-shortcuts.mu.html b/html/edit/003-shortcuts.mu.html index f909a4c7..bac26d3c 100644 --- a/html/edit/003-shortcuts.mu.html +++ b/html/edit/003-shortcuts.mu.html @@ -44,12 +44,12 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color # just one character in final line s:text <- new [ab cd] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 5/right + e:&:editor <- new-editor s, screen, 0/left, 5/right assume-console [ press tab ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -76,7 +76,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color scenario editor-handles-backspace-key [ 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 [ @@ -84,7 +84,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color press backspace ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e 4:num/raw <- get *e, cursor-row:offset 5:num/raw <- get *e, cursor-column:offset ] @@ -256,13 +256,13 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color # just one character in final line s:text <- new [ab cd] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 10/right + e:&:editor <- new-editor s, screen, 0/left, 10/right assume-console [ left-click 2, 0 # cursor at only character in final line press backspace ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e 4:num/raw <- get *e, cursor-row:offset 5:num/raw <- get *e, cursor-column:offset ] @@ -284,7 +284,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color # initialize editor with two long-ish but non-wrapping lines s:text <- new [abc def ghi jkl] - 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 # position the cursor at the start of the second and hit backspace @@ -293,7 +293,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color press backspace ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # resulting single line should wrap correctly screen-should-contain [ @@ -309,7 +309,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color local-scope assume-screen 10/width, 5/height # initialize editor in part of the screen with a long line - e:&:editor <- new-editor [abc def ghij], screen:&:screen, 0/left, 8/right + e:&:editor <- new-editor [abc def ghij], screen, 0/left, 8/right editor-render screen, e # confirm that it wraps screen-should-contain [ @@ -325,7 +325,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color press backspace ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # resulting single line should wrap correctly and not overflow its bounds screen-should-contain [ @@ -342,14 +342,14 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color scenario editor-handles-delete-key [ 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 [ press delete ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -363,7 +363,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color press delete ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -431,7 +431,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color scenario editor-moves-cursor-right-with-key [ 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 [ @@ -439,7 +439,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color type [0] ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -530,7 +530,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 # type right-arrow a few times to get to start of second line @@ -541,7 +541,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color press right-arrow # next line ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] check-trace-count-for-label 0, [print-character] # type something and ensure it goes where it should @@ -549,7 +549,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color type [0] ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -566,7 +566,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, 1/left, 10/right + e:&:editor <- new-editor s, screen, 1/left, 10/right editor-render screen, e assume-console [ press right-arrow @@ -576,7 +576,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color type [0] ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -590,7 +590,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color scenario editor-moves-cursor-to-next-wrapped-line-with-right-arrow [ local-scope assume-screen 10/width, 5/height - e:&:editor <- new-editor [abcdef], screen:&:screen, 0/left, 5/right + e:&:editor <- new-editor [abcdef], screen, 0/left, 5/right editor-render screen, e $clear-trace assume-console [ @@ -598,7 +598,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color press right-arrow ] 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 ] @@ -620,7 +620,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color local-scope assume-screen 10/width, 5/height # line just barely wrapping - e:&:editor <- new-editor [abcde], screen:&:screen, 0/left, 5/right + e:&:editor <- new-editor [abcde], screen, 0/left, 5/right editor-render screen, e $clear-trace # position cursor at last character before wrap and hit right-arrow @@ -629,7 +629,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color press right-arrow ] 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 ] @@ -642,7 +642,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color press right-arrow ] 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 ] @@ -656,7 +656,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color scenario editor-moves-cursor-to-next-wrapped-line-with-right-arrow-3 [ local-scope assume-screen 10/width, 5/height - e:&:editor <- new-editor [abcdef], screen:&:screen, 1/left, 6/right + e:&:editor <- new-editor [abcdef], screen, 1/left, 6/right editor-render screen, e $clear-trace assume-console [ @@ -664,7 +664,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color press right-arrow ] 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 ] @@ -687,7 +687,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 # move to end of line, press right-arrow, type a character @@ -697,7 +697,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color type [0] ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # new character should be in next line screen-should-contain [ @@ -717,7 +717,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color scenario editor-moves-cursor-left-with-key [ 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 [ @@ -726,7 +726,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color type [0] ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -762,7 +762,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color # initialize editor with two lines 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 # position cursor at start of second line (so there's no previous newline) @@ -771,7 +771,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color press left-arrow ] 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 ] @@ -789,7 +789,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color s:text <- new [abc def g] - e:&:editor <- new-editor s:text, screen:&:screen, 0/left, 10/right + e:&:editor <- new-editor s:text, screen, 0/left, 10/right editor-render screen, e $clear-trace # position cursor further down (so there's a newline before the character at @@ -800,7 +800,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color type [0] ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -818,7 +818,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color s:text <- new [abc def g] - 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 # position cursor at start of text, press left-arrow, then type a character @@ -828,7 +828,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color type [0] ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # left-arrow should have had no effect screen-should-contain [ @@ -848,7 +848,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color 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:&:editor $clear-trace # position cursor right after empty line @@ -858,7 +858,7 @@ d] type [0] ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -874,7 +874,7 @@ d] local-scope assume-screen 10/width, 5/height # initialize editor with a wrapping line - e:&:editor <- new-editor [abcdef], screen:&:screen, 0/left, 5/right + e:&:editor <- new-editor [abcdef], screen, 0/left, 5/right editor-render screen, e $clear-trace screen-should-contain [ @@ -890,7 +890,7 @@ d] press left-arrow ] 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 ] @@ -907,7 +907,7 @@ d] # initialize editor with a wrapping line followed by a second line s:text <- new [abcdef g] - 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 $clear-trace screen-should-contain [ @@ -923,7 +923,7 @@ d] press left-arrow ] 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 ] @@ -940,7 +940,7 @@ d] # initialize editor with a line on the verge of wrapping, followed by a second line s:text <- new [abcd e] - 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 $clear-trace screen-should-contain [ @@ -956,7 +956,7 @@ d] press left-arrow ] 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 ] @@ -976,7 +976,7 @@ d] 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 editor-render screen, e $clear-trace assume-console [ @@ -984,7 +984,7 @@ d] press up-arrow ] 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 ] @@ -997,7 +997,7 @@ d] type [0] ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -1093,7 +1093,7 @@ d] assume-screen 10/width, 5/height s:text <- new [ab def] - 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 [ @@ -1101,7 +1101,7 @@ d] press up-arrow ] 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 ] @@ -1114,7 +1114,7 @@ d] type [0] ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -1130,7 +1130,7 @@ d] assume-screen 10/width, 5/height s:text <- new [ def] - 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 [ @@ -1138,7 +1138,7 @@ d] press up-arrow ] 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 ] @@ -1151,7 +1151,7 @@ d] type [0] ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -1169,7 +1169,7 @@ d] s:text <- new [abc def ghi] - 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 # click on the third line and hit up-arrow, so you end up just after a newline @@ -1178,7 +1178,7 @@ d] press up-arrow ] 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 ] @@ -1191,7 +1191,7 @@ d] type [0] ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -1209,7 +1209,7 @@ d] 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 editor-render screen, e $clear-trace # cursor starts out at (1, 0) @@ -1217,7 +1217,7 @@ d] press down-arrow ] 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 ] @@ -1231,7 +1231,7 @@ d] type [0] ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -1315,7 +1315,7 @@ d] assume-screen 10/width, 5/height s:text <- new [abc de] - 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 [ @@ -1323,7 +1323,7 @@ d] press down-arrow ] 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 ] @@ -1336,7 +1336,7 @@ d] type [0] ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -1354,7 +1354,7 @@ d] assume-screen 10/width, 5/height s:text <- new [123 456] - 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 # start on second line, press ctrl-a @@ -1363,7 +1363,7 @@ d] press ctrl-a ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e 4:num/raw <- get *e, cursor-row:offset 5:num/raw <- get *e, cursor-column:offset ] @@ -1430,7 +1430,7 @@ d] assume-screen 10/width, 5/height s:text <- new [123 456] - 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 # start on first line (no newline before), press ctrl-a @@ -1439,7 +1439,7 @@ d] press ctrl-a ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e 4:num/raw <- get *e, cursor-row:offset 5:num/raw <- get *e, cursor-column:offset ] @@ -1456,7 +1456,7 @@ d] assume-screen 10/width, 5/height s:text <- new [123 456] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 10/right + e:&:editor <- new-editor s, screen, 0/left, 10/right $clear-trace # start on second line, press 'home' assume-console [ @@ -1464,7 +1464,7 @@ d] press home ] 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 ] @@ -1481,7 +1481,7 @@ d] assume-screen 10/width, 5/height s:text <- new [123 456] - 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 # start on first line (no newline before), press 'home' @@ -1490,7 +1490,7 @@ d] press home ] 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 ] @@ -1509,7 +1509,7 @@ d] assume-screen 10/width, 5/height s:text <- new [123 456] - 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 # start on first line, press ctrl-e @@ -1518,7 +1518,7 @@ d] press ctrl-e ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e 4:num/raw <- get *e, cursor-row:offset 5:num/raw <- get *e, cursor-column:offset ] @@ -1533,7 +1533,7 @@ d] type [z] ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e 4:num/raw <- get *e, cursor-row:offset 5:num/raw <- get *e, cursor-column:offset ] @@ -1602,7 +1602,7 @@ d] assume-screen 10/width, 5/height s:text <- new [123 456] - 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 # start on second line (no newline after), press ctrl-e @@ -1611,7 +1611,7 @@ d] press ctrl-e ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e 4:num/raw <- get *e, cursor-row:offset 5:num/raw <- get *e, cursor-column:offset ] @@ -1628,7 +1628,7 @@ d] assume-screen 10/width, 5/height s:text <- new [123 456] - 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 # start on first line, press 'end' @@ -1637,7 +1637,7 @@ d] press end ] 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 ] @@ -1654,7 +1654,7 @@ d] assume-screen 10/width, 5/height s:text <- new [123 456] - 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 # start on second line (no newline after), press 'end' @@ -1663,7 +1663,7 @@ d] press end ] 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 ] @@ -1682,14 +1682,14 @@ d] assume-screen 10/width, 5/height s:text <- new [123 456] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 10/right + e:&:editor <- new-editor s, screen, 0/left, 10/right # start on second line, press ctrl-u assume-console [ left-click 2, 2 press ctrl-u ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # cursor deletes to start of line screen-should-contain [ @@ -1746,14 +1746,14 @@ d] assume-screen 10/width, 5/height s:text <- new [123 456] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 10/right + e:&:editor <- new-editor s, screen, 0/left, 10/right # start on first line (no newline before), press ctrl-u assume-console [ left-click 1, 2 press ctrl-u ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # cursor deletes to start of line screen-should-contain [ @@ -1770,14 +1770,14 @@ d] assume-screen 10/width, 5/height s:text <- new [123 456] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 10/right + e:&:editor <- new-editor s, screen, 0/left, 10/right # start past end of line, press ctrl-u assume-console [ left-click 1, 3 press ctrl-u ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # cursor deletes to start of line screen-should-contain [ @@ -1794,14 +1794,14 @@ d] assume-screen 10/width, 5/height s:text <- new [123 456] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 10/right + e:&:editor <- new-editor s, screen, 0/left, 10/right # start past end of final line, press ctrl-u assume-console [ left-click 2, 3 press ctrl-u ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # cursor deletes to start of line screen-should-contain [ @@ -1820,14 +1820,14 @@ d] assume-screen 10/width, 5/height s:text <- new [123 456] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 10/right + e:&:editor <- new-editor s, screen, 0/left, 10/right # start on first line, press ctrl-k assume-console [ left-click 1, 1 press ctrl-k ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # cursor deletes to end of line screen-should-contain [ @@ -1876,14 +1876,14 @@ d] assume-screen 10/width, 5/height s:text <- new [123 456] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 10/right + e:&:editor <- new-editor s, screen, 0/left, 10/right # start on second line (no newline after), press ctrl-k assume-console [ left-click 2, 1 press ctrl-k ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # cursor deletes to end of line screen-should-contain [ @@ -1900,14 +1900,14 @@ d] assume-screen 10/width, 5/height s:text <- new [123 456] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 10/right + e:&:editor <- new-editor s, screen, 0/left, 10/right # start at end of line assume-console [ left-click 1, 2 press ctrl-k ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # cursor deletes just last character screen-should-contain [ @@ -1924,14 +1924,14 @@ d] assume-screen 10/width, 5/height s:text <- new [123 456] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 10/right + e:&:editor <- new-editor s, screen, 0/left, 10/right # start past end of line assume-console [ left-click 1, 3 press ctrl-k ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # cursor deletes nothing screen-should-contain [ @@ -1948,14 +1948,14 @@ d] assume-screen 10/width, 5/height s:text <- new [123 456] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 10/right + e:&:editor <- new-editor s, screen, 0/left, 10/right # start at end of text assume-console [ left-click 2, 2 press ctrl-k ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # cursor deletes just the final character screen-should-contain [ @@ -1972,14 +1972,14 @@ d] assume-screen 10/width, 5/height s:text <- new [123 456] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 10/right + e:&:editor <- new-editor s, screen, 0/left, 10/right # start past end of text assume-console [ left-click 2, 3 press ctrl-k ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # cursor deletes nothing screen-should-contain [ @@ -2002,7 +2002,7 @@ d] b c d] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 10/right + e:&:editor <- new-editor s, screen, 0/left, 10/right screen-should-contain [ . . .a . @@ -2015,7 +2015,7 @@ d] press down-arrow ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # screen slides by one line screen-should-contain [ @@ -2081,7 +2081,7 @@ d] g h i] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 5/right + e:&:editor <- new-editor s, screen, 0/left, 5/right screen-should-contain [ . . .abcd↩ . @@ -2094,7 +2094,7 @@ d] press down-arrow ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # screen shows partial wrapped line screen-should-contain [ @@ -2114,14 +2114,14 @@ d] k l m] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 5/right + e:&:editor <- new-editor s, screen, 0/left, 5/right # position cursor at last line, then try to move further down assume-console [ left-click 3, 0 press down-arrow ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # screen shows partial wrapped line containing a wrap icon screen-should-contain [ @@ -2135,7 +2135,7 @@ d] press down-arrow ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # screen shows partial wrapped line screen-should-contain [ @@ -2154,14 +2154,14 @@ d] s:text <- new [a b cdef] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 5/right + e:&:editor <- new-editor s, screen, 0/left, 5/right # position cursor at end, type a character assume-console [ left-click 3, 4 type [g] ] 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 ] @@ -2185,14 +2185,14 @@ d] s:text <- new [a b c] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 5/right + e:&:editor <- new-editor s, screen, 0/left, 5/right assume-console [ left-click 3, 4 type [ ] ] 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 ] @@ -2217,14 +2217,14 @@ d] s:text <- new [a b cdefgh] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 5/right + e:&:editor <- new-editor s, screen, 0/left, 5/right # position cursor at end of screen and try to move right assume-console [ left-click 3, 3 press right-arrow ] 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 ] @@ -2250,14 +2250,14 @@ d] b c d] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 5/right + e:&:editor <- new-editor s, screen, 0/left, 5/right # position cursor at end of screen and try to move right assume-console [ left-click 3, 3 press right-arrow ] 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 ] @@ -2279,7 +2279,7 @@ d] assume-screen 10/width, 5/height s:text <- new [abc de] - 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 # try to move down past end of text @@ -2288,7 +2288,7 @@ d] press down-arrow ] 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 ] @@ -2301,7 +2301,7 @@ d] type [0] ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -2316,7 +2316,7 @@ d] press down-arrow ] 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 ] @@ -2330,7 +2330,7 @@ d] type [1] ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -2352,7 +2352,7 @@ d] e f g] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 5/right + e:&:editor <- new-editor s, screen, 0/left, 5/right # scroll down one page and one line assume-console [ press page-down @@ -2360,7 +2360,7 @@ d] press down-arrow ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # screen scrolls down 3 lines screen-should-contain [ @@ -2382,7 +2382,7 @@ d] b c d] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 10/right + e:&:editor <- new-editor s, screen, 0/left, 10/right screen-should-contain [ . . .a . @@ -2395,7 +2395,7 @@ d] press up-arrow ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # screen slides by one line screen-should-contain [ @@ -2471,7 +2471,7 @@ d] g h i] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 5/right + e:&:editor <- new-editor s, screen, 0/left, 5/right screen-should-contain [ . . .abcd↩ . @@ -2483,7 +2483,7 @@ d] press page-down ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -2496,7 +2496,7 @@ d] press up-arrow ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # screen shows partial wrapped line screen-should-contain [ @@ -2516,13 +2516,13 @@ d] k l m] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 5/right + e:&:editor <- new-editor s, screen, 0/left, 5/right # position cursor at top of second page assume-console [ press page-down ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -2536,7 +2536,7 @@ d] press up-arrow ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # screen shows partial wrapped line screen-should-contain [ @@ -2551,7 +2551,7 @@ d] press up-arrow ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # screen shows partial wrapped line screen-should-contain [ @@ -2566,7 +2566,7 @@ d] press up-arrow ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # screen shows partial wrapped line screen-should-contain [ @@ -2590,7 +2590,7 @@ d] g h i] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 6/right + e:&:editor <- new-editor s, screen, 0/left, 6/right screen-should-contain [ . . .abcde↩ . @@ -2602,7 +2602,7 @@ d] press page-down ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -2615,7 +2615,7 @@ d] press up-arrow ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # screen shows partial wrapped line screen-should-contain [ @@ -2637,12 +2637,12 @@ d] c d e] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 6/right + e:&:editor <- new-editor s, screen, 0/left, 6/right assume-console [ press page-down ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -2654,7 +2654,7 @@ e] press page-down ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -2666,7 +2666,7 @@ e] press page-up ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -2686,13 +2686,13 @@ e] c d e] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 5/right + e:&:editor <- new-editor s, screen, 0/left, 5/right # position cursor at top of second page assume-console [ press page-down ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -2705,7 +2705,7 @@ e] press left-arrow ] 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 ] @@ -2731,7 +2731,7 @@ e] b c d] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 10/right + e:&:editor <- new-editor s, screen, 0/left, 10/right screen-should-contain [ . . .a . @@ -2746,7 +2746,7 @@ e] press up-arrow ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # screen slides by one line screen-should-contain [ @@ -2760,7 +2760,7 @@ e] press up-arrow ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # screen remains unchanged screen-should-contain [ @@ -2780,7 +2780,7 @@ e] b c d] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 10/right + e:&:editor <- new-editor s, screen, 0/left, 10/right screen-should-contain [ . . .a . @@ -2792,7 +2792,7 @@ e] press page-down ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # screen shows next page screen-should-contain [ @@ -2866,7 +2866,7 @@ e] assume-screen 10/width, 4/height s:text <- new [a b] - 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 screen-should-contain [ . . @@ -2879,7 +2879,7 @@ e] press page-down ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # screen remains unmodified screen-should-contain [ @@ -2899,7 +2899,7 @@ e] b cdefgh] # editor screen triggers wrap of last line - e:&:editor <- new-editor s, screen:&:screen, 0/left, 4/right + e:&:editor <- new-editor s, screen, 0/left, 4/right # some part of last line is not displayed screen-should-contain [ . . @@ -2912,7 +2912,7 @@ e] press page-down ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # screen shows entire wrapped line screen-should-contain [ @@ -2931,7 +2931,7 @@ e] # and still has something left over s:text <- new [a bcdefgh] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 4/right + e:&:editor <- new-editor s, screen, 0/left, 4/right # some part of last line is not displayed screen-should-contain [ . . @@ -2944,7 +2944,7 @@ e] press page-down ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # screen shows entire wrapped line screen-should-contain [ @@ -2964,7 +2964,7 @@ e] b c d] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 10/right + e:&:editor <- new-editor s, screen, 0/left, 10/right screen-should-contain [ . . .a . @@ -2976,7 +2976,7 @@ e] press page-down ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # screen shows next page screen-should-contain [ @@ -2990,7 +2990,7 @@ e] press page-up ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # screen shows original page again screen-should-contain [ @@ -3065,7 +3065,7 @@ e] f g h] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 10/right + e:&:editor <- new-editor s, screen, 0/left, 10/right screen-should-contain [ . . .a . @@ -3078,7 +3078,7 @@ e] press page-down ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # screen shows third page screen-should-contain [ @@ -3092,7 +3092,7 @@ e] press page-up ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # screen shows second page screen-should-contain [ @@ -3106,7 +3106,7 @@ e] press page-up ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # screen shows original page again screen-should-contain [ @@ -3133,7 +3133,7 @@ e] n o] # editor screen triggers wrap of last line - e:&:editor <- new-editor s, screen:&:screen, 0/left, 4/right + e:&:editor <- new-editor s, screen, 0/left, 4/right # some part of last line is not displayed screen-should-contain [ . . @@ -3150,7 +3150,7 @@ e] press down-arrow ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # screen shows entire wrapped line screen-should-contain [ @@ -3166,7 +3166,7 @@ e] press page-up ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # screen resets screen-should-contain [ @@ -3187,7 +3187,7 @@ e] # and still has something left over s:text <- new [a bcdefgh] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 4/right + e:&:editor <- new-editor s, screen, 0/left, 4/right # some part of last line is not displayed screen-should-contain [ . . @@ -3200,7 +3200,7 @@ e] press page-down ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # screen shows entire wrapped line screen-should-contain [ @@ -3214,7 +3214,7 @@ e] press page-up ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] # screen resets screen-should-contain [ @@ -3238,7 +3238,7 @@ e] gxx hxx ] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 4/right + e:&:editor <- new-editor s, screen, 0/left, 4/right screen-should-contain [ . . .axx . @@ -3249,7 +3249,7 @@ e] press page-down ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -3261,7 +3261,7 @@ e] press page-down ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -3274,7 +3274,7 @@ e] press page-up ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -3297,7 +3297,7 @@ exy fxy gxy ] - e:&:editor <- new-editor s, screen:&:screen, 0/left, 4/right + e:&:editor <- new-editor s, screen, 0/left, 4/right screen-should-contain [ . . .axy . @@ -3308,7 +3308,7 @@ gxy press page-down ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -3320,7 +3320,7 @@ gxy press page-down ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . @@ -3333,7 +3333,7 @@ gxy press page-up ] run [ - editor-event-loop screen:&:screen, console:&:console, e + editor-event-loop screen, console, e ] screen-should-contain [ . . -- cgit 1.4.1-2-gfad0