about summary refs log tree commit diff stats
path: root/edit
diff options
context:
space:
mode:
Diffstat (limited to 'edit')
-rw-r--r--edit/005-sandbox.mu85
-rw-r--r--edit/006-sandbox-edit.mu10
-rw-r--r--edit/007-sandbox-delete.mu12
3 files changed, 48 insertions, 59 deletions
diff --git a/edit/005-sandbox.mu b/edit/005-sandbox.mu
index 80dd4120..9ae94ee3 100644
--- a/edit/005-sandbox.mu
+++ b/edit/005-sandbox.mu
@@ -556,27 +556,19 @@ scenario scrolling-down-past-bottom-of-sandbox-editor [
   assume-console [
     # create a sandbox
     press F4
-    # switch to sandbox editor and type in 2 lines
-    press ctrl-n
-    type [abc
-]
-  ]
-  run [
-    event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data
-    4:character/cursor <- copy 9251/␣
-    print screen:address:screen, 4:character/cursor
   ]
+  event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data
   screen-should-contain [
     .                              .  # minor: F4 clears menu tooltip in very narrow screens
-    .               ┊abc           .
-    .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊␣             .
-    .               ┊━━━━━━━━━━━━━━.
+    .               ┊              .
+    .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊━━━━━━━━━━━━━━.
     .               ┊0            x.
     .               ┊add 2, 2      .
   ]
-  # hit 'down' at bottom of sandbox editor
+  # switch to sandbox window and hit 'page-down'
   assume-console [
-    press down-arrow
+    press ctrl-n
+    press page-down
   ]
   run [
     event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data
@@ -594,36 +586,31 @@ scenario scrolling-down-past-bottom-of-sandbox-editor [
     .               ┊━━━━━━━━━━━━━━.
     .               ┊              .
   ]
-  # hit 'up'
+  # hit 'page-up'
   assume-console [
-    press up-arrow
+    press page-up
   ]
   run [
     event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data
     4:character/cursor <- copy 9251/␣
     print screen:address:screen, 4:character/cursor
   ]
-  # sandbox editor displays again
+  # sandbox editor displays again, cursor is in editor
   screen-should-contain [
     .                              .  # minor: F4 clears menu tooltip in very narrow screens
-    .               ┊abc           .
-    .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊␣             .
-    .               ┊━━━━━━━━━━━━━━.
+    .               ┊␣             .
+    .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊━━━━━━━━━━━━━━.
     .               ┊0            x.
     .               ┊add 2, 2      .
   ]
 ]
 
-# down on sandbox side updates render-from when sandbox editor has cursor at bottom
+# page-down on sandbox side updates render-from to scroll sandboxes
 after <global-keypress> [
   {
     break-unless sandbox-in-focus?
-    down?:boolean <- equal k, 65516/down-arrow
-    break-unless down?
-    sandbox-bottom:number <- get *current-sandbox, bottom:offset
-    sandbox-cursor:number <- get *current-sandbox, cursor-row:offset
-    sandbox-cursor-on-last-line?:boolean <- equal sandbox-bottom, sandbox-cursor
-    break-unless sandbox-cursor-on-last-line?
+    page-down?:boolean <- equal k, 65518/page-down
+    break-unless page-down?
     sandbox:address:sandbox-data <- get *env, sandbox:offset
     break-unless sandbox
     # slide down if possible
@@ -656,12 +643,12 @@ after <update-cursor-special-cases> [
   }
 ]
 
-# 'up' on sandbox side is like 'down': updates render-from when necessary
+# 'page-up' on sandbox side is like 'page-down': updates render-from when necessary
 after <global-keypress> [
   {
     break-unless sandbox-in-focus?
-    up?:boolean <- equal k, 65517/up-arrow
-    break-unless up?
+    page-up?:boolean <- equal k, 65519/page-up
+    break-unless page-up?
     render-from:number <- get *env, render-from:offset
     at-beginning?:boolean <- equal render-from, -1
     break-if at-beginning?
@@ -760,9 +747,9 @@ scenario scrolling-through-multiple-sandboxes [
     .               ┊add 2, 2      .
     .               ┊4             .
   ]
-  # hit 'down'
+  # hit 'page-down'
   assume-console [
-    press down-arrow
+    press page-down
   ]
   run [
     event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data
@@ -783,9 +770,9 @@ scenario scrolling-through-multiple-sandboxes [
     .               ┊4             .
     .               ┊━━━━━━━━━━━━━━.
   ]
-  # hit 'down' again
+  # hit 'page-down' again
   assume-console [
-    press down-arrow
+    press page-down
   ]
   run [
     event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data
@@ -801,9 +788,9 @@ scenario scrolling-through-multiple-sandboxes [
     .               ┊              .
     .               ┊              .
   ]
-  # hit 'down' again
+  # hit 'page-down' again
   assume-console [
-    press down-arrow
+    press page-down
   ]
   run [
     event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data
@@ -819,9 +806,9 @@ scenario scrolling-through-multiple-sandboxes [
     .               ┊              .
     .               ┊              .
   ]
-  # hit 'up'
+  # hit 'page-up'
   assume-console [
-    press up-arrow
+    press page-up
   ]
   run [
     event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data
@@ -839,9 +826,9 @@ scenario scrolling-through-multiple-sandboxes [
     .               ┊4             .
     .               ┊━━━━━━━━━━━━━━.
   ]
-  # hit 'up' again
+  # hit 'page-up' again
   assume-console [
-    press up-arrow
+    press page-up
   ]
   run [
     event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data
@@ -861,12 +848,14 @@ scenario scrolling-through-multiple-sandboxes [
     .               ┊add 2, 2      .
     .               ┊4             .
   ]
-  # hit 'up' again
+  # hit 'page-up' again
   assume-console [
-    press up-arrow
+    press page-up
   ]
   run [
     event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data
+    4:character/cursor <- copy 9251/␣
+    print screen:address:screen, 4:character/cursor
   ]
   # no change
   screen-should-contain [
@@ -908,9 +897,9 @@ scenario scrolling-manages-sandbox-index-correctly [
     .               ┊━━━━━━━━━━━━━━.
     .               ┊              .
   ]
-  # hit 'down' and 'up' a couple of times. sandbox index should be stable
+  # hit 'page-down' and 'page-up' a couple of times. sandbox index should be stable
   assume-console [
-    press down-arrow
+    press page-down
   ]
   run [
     event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data
@@ -926,9 +915,9 @@ scenario scrolling-manages-sandbox-index-correctly [
     .               ┊━━━━━━━━━━━━━━.
     .               ┊              .
   ]
-  # hit 'up' again
+  # hit 'page-up' again
   assume-console [
-    press up-arrow
+    press page-up
   ]
   run [
     event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data
@@ -944,9 +933,9 @@ scenario scrolling-manages-sandbox-index-correctly [
     .               ┊━━━━━━━━━━━━━━.
     .               ┊              .
   ]
-  # hit 'down'
+  # hit 'page-down'
   assume-console [
-    press down-arrow
+    press page-down
   ]
   run [
     event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data
diff --git a/edit/006-sandbox-edit.mu b/edit/006-sandbox-edit.mu
index 257aed22..6d83cee2 100644
--- a/edit/006-sandbox-edit.mu
+++ b/edit/006-sandbox-edit.mu
@@ -200,8 +200,8 @@ scenario editing-sandbox-after-scrolling-resets-scroll [
     press F4
     type [add 1, 1]
     press F4
-    press down-arrow
-    press down-arrow
+    press page-down
+    press page-down
   ]
   event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data
   screen-should-contain [
@@ -281,9 +281,9 @@ scenario editing-sandbox-updates-sandbox-count [
   ]
   # now try to scroll past end
   assume-console [
-    press down-arrow
-    press down-arrow
-    press down-arrow
+    press page-down
+    press page-down
+    press page-down
   ]
   run [
     event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data
diff --git a/edit/007-sandbox-delete.mu b/edit/007-sandbox-delete.mu
index 3df11a4a..4f77f205 100644
--- a/edit/007-sandbox-delete.mu
+++ b/edit/007-sandbox-delete.mu
@@ -153,7 +153,7 @@ scenario deleting-sandbox-after-scroll [
     press F4
     type [add 1, 1]
     press F4
-    press down-arrow
+    press page-down
   ]
   event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data
   screen-should-contain [
@@ -199,7 +199,7 @@ scenario deleting-top-sandbox-after-scroll [
     press F4
     type [add 1, 1]
     press F4
-    press down-arrow
+    press page-down
   ]
   event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data
   screen-should-contain [
@@ -245,8 +245,8 @@ scenario deleting-final-sandbox-after-scroll [
     press F4
     type [add 1, 1]
     press F4
-    press down-arrow
-    press down-arrow
+    press page-down
+    press page-down
   ]
   event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data
   screen-should-contain [
@@ -310,8 +310,8 @@ scenario deleting-updates-sandbox-count [
   # delete the second sandbox, then try to scroll down twice
   assume-console [
     left-click 3, 29
-    press down-arrow
-    press down-arrow
+    press page-down
+    press page-down
   ]
   run [
     event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data