about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--apps/tile/environment.mu16
1 files changed, 16 insertions, 0 deletions
diff --git a/apps/tile/environment.mu b/apps/tile/environment.mu
index 8bec7366..64a779f7 100644
--- a/apps/tile/environment.mu
+++ b/apps/tile/environment.mu
@@ -325,6 +325,18 @@ $process:body: {
       # so the final word is always guaranteed to be at the top-level
       break $process:body
     }
+    compare key, 0x15  # ctrl-u
+    $process:clear-line: {
+      break-if-!=
+      # clear line in sandbox
+      var cursor-call-path-ah/eax: (addr handle call-path-element) <- get sandbox, cursor-call-path
+      allocate cursor-call-path-ah
+      var line-ah/eax: (addr handle line) <- get sandbox, data
+      allocate line-ah
+      var line/eax: (addr line) <- lookup *line-ah
+      initialize-line line
+      break $process:body
+    }
     # if cursor is within a call, disable editing hotkeys below
     var cursor-call-path-ah/eax: (addr handle call-path-element) <- get sandbox, cursor-call-path
     var cursor-call-path/eax: (addr call-path-element) <- lookup *cursor-call-path-ah
@@ -837,6 +849,10 @@ fn clear-canvas _env: (addr environment) {
   print-string screen, " ctrl-e "
   reset-formatting screen
   print-string screen, " ⏭  "
+  start-reverse-video screen
+  print-string screen, " ctrl-u "
+  reset-formatting screen
+  print-string screen, " clear line  "
   # currently defined functions
   move-cursor screen, 3, 2
   print-string screen, "x 2* = x 2 *"