about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-09-01 20:36:43 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-09-01 20:36:43 -0700
commit449059c44d7145253a61c225bcf1911b6c566d46 (patch)
treefe1bc2c4e552c77c9bbe664e8656de99be99689e
parent5ca4a2af43442bf2a71255114220a2a20df7189d (diff)
downloadmu-449059c44d7145253a61c225bcf1911b6c566d46.tar.gz
2128
-rw-r--r--edit.mu20
1 files changed, 20 insertions, 0 deletions
diff --git a/edit.mu b/edit.mu
index 31d479c2..7d7ccc81 100644
--- a/edit.mu
+++ b/edit.mu
@@ -5942,6 +5942,23 @@ recipe foo [
     .                    ┊                   .
     .                    ┊                   .
   ]
+  # cursor should be in the right place
+  assume-console [
+    type [0]
+  ]
+  run [
+    event-loop screen:address, console:address, 3:address:programming-environment-data
+  ]
+  screen-should-contain [
+    .                     run (F4)           .
+    .                    ┊0foo               .
+    .recipe foo [        ┊━━━━━━━━━━━━━━━━━━━.
+    .  add 2, 2          ┊                   .
+    .]                   ┊                   .
+    .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊                   .
+    .                    ┊                   .
+    .                    ┊                   .
+  ]
 ]
 
 after +global-touch [
@@ -6003,6 +6020,9 @@ recipe extract-sandbox [
   # snip sandbox out of its list
   result:address:sandbox-data <- copy *sandbox
   *sandbox <- copy next-sandbox
+  # position cursor in sandbox editor
+  sandbox-in-focus?:address:boolean <- get-address *env, sandbox-in-focus?:offset
+  *sandbox-in-focus? <- copy 1/true
   reply result
 ]