about summary refs log tree commit diff stats
path: root/apps/tile
diff options
context:
space:
mode:
Diffstat (limited to 'apps/tile')
-rw-r--r--apps/tile/environment.mu15
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/tile/environment.mu b/apps/tile/environment.mu
index 25f3cc70..193fbc97 100644
--- a/apps/tile/environment.mu
+++ b/apps/tile/environment.mu
@@ -215,6 +215,21 @@ $process:body: {
       toggle-cursor-word sandbox
       break $process:body
     }
+    compare key, 0x10  # 16 = ctrl-p
+    {
+      break-if-!=
+      # jump to previous word at same level
+      var prev-word-ah/edx: (addr handle word) <- get cursor-word, prev
+      var prev-word/eax: (addr word) <- lookup *prev-word-ah
+      {
+        compare prev-word, 0
+        break-if-=
+        copy-object prev-word-ah, cursor-word-ah
+        cursor-to-end prev-word
+        var cursor-call-path/eax: (addr handle call-path-element) <- get sandbox, cursor-call-path
+        decrement-final-element cursor-call-path
+      }
+    }
     # 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