about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-12-06 21:57:27 -0800
committerKartik Agaram <vc@akkartik.com>2020-12-06 21:57:27 -0800
commit642c7c8cab9dc4efe056a7774b42832646a43ba3 (patch)
treef1da5c205d0da059e6b3369958135f3fc81a1990
parentbec147690f631800265d4771b911c1d54a05e489 (diff)
downloadmu-642c7c8cab9dc4efe056a7774b42832646a43ba3.tar.gz
7342 - tile: hotkeys for ending function edit
-rw-r--r--apps/tile/environment.mu20
1 files changed, 20 insertions, 0 deletions
diff --git a/apps/tile/environment.mu b/apps/tile/environment.mu
index 3103dd6e..1795b32b 100644
--- a/apps/tile/environment.mu
+++ b/apps/tile/environment.mu
@@ -267,6 +267,26 @@ fn process-function-edit _self: (addr environment), _function: (addr function),
     cursor-to-end cursor-word
     return
   }
+  # bounce to another function
+  compare key, 7  # ctrl-g
+  $process-function-edit:goto-function: {
+    break-if-!=
+    # initialize dialog to name function to jump to
+    var partial-function-name-ah/eax: (addr handle word) <- get self, partial-function-name
+    allocate partial-function-name-ah
+    var partial-function-name/eax: (addr word) <- lookup *partial-function-name-ah
+    initialize-word partial-function-name
+    return
+  }
+  # bounce to sandbox
+  compare key, 9  # tab
+  $process-function-edit:goto-sandbox: {
+    break-if-!=
+    var function-ah/eax: (addr handle function) <- get self, cursor-function
+    clear-object function-ah
+    return
+  }
+  # editing the current function
   compare key, 0x7f  # del (backspace on Macs)
   $process-function-edit:backspace: {
     break-if-!=