about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-06-04 22:05:02 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-06-04 22:05:02 -0700
commit4975bc82dfc71fe113b61c7d2448919d8a52c834 (patch)
tree7111f18844fd60f459551fab8d7162306ae37dde
parent7de9d457eb2886998cf0cbdd84892f4a4bcecce4 (diff)
downloadmu-4975bc82dfc71fe113b61c7d2448919d8a52c834.tar.gz
bugfix: show functions after ctrl-g, enter
-rw-r--r--shell/environment.mu9
1 files changed, 8 insertions, 1 deletions
diff --git a/shell/environment.mu b/shell/environment.mu
index cb93e396..1d26b2cf 100644
--- a/shell/environment.mu
+++ b/shell/environment.mu
@@ -141,7 +141,14 @@ fn edit-environment _self: (addr environment), key: grapheme, data-disk: (addr d
       copy-to *cursor-in-globals-a, 1/true
       var partial-function-name-ah/eax: (addr handle gap-buffer) <- get self, partial-function-name
       var partial-function-name/eax: (addr gap-buffer) <- lookup *partial-function-name-ah
-      set-global-cursor-index globals, partial-function-name
+      {
+        {
+          var empty?/eax: boolean <- gap-buffer-empty? partial-function-name
+          compare empty?, 0/false
+        }
+        break-if-!=
+        set-global-cursor-index globals, partial-function-name
+      }
       var cursor-in-globals-a/ecx: (addr boolean) <- get self, cursor-in-globals?
       copy-to *cursor-in-globals-a, 1/true
       {