about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-06-05 17:39:56 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-06-05 17:39:56 -0700
commitf3ee7be6831db4c4d9b7cd570c07b9bae7b608ed (patch)
tree546f3ff46c91b51a2744069e058af1393add0040
parent48522591f85f272230bf628213675c41db3c08ae (diff)
downloadmu-f3ee7be6831db4c4d9b7cd570c07b9bae7b608ed.tar.gz
.
-rw-r--r--shell/gap-buffer.mu8
1 files changed, 2 insertions, 6 deletions
diff --git a/shell/gap-buffer.mu b/shell/gap-buffer.mu
index d2b5ffea..409089cf 100644
--- a/shell/gap-buffer.mu
+++ b/shell/gap-buffer.mu
@@ -80,13 +80,9 @@ fn load-gap-buffer-from-stream self: (addr gap-buffer), in: (addr stream byte) {
   }
 }
 
-fn emit-gap-buffer _self: (addr gap-buffer), out: (addr stream byte) {
-  var self/esi: (addr gap-buffer) <- copy _self
+fn emit-gap-buffer self: (addr gap-buffer), out: (addr stream byte) {
   clear-stream out
-  var left/eax: (addr grapheme-stack) <- get self, left
-  emit-stack-from-bottom left, out
-  var right/eax: (addr grapheme-stack) <- get self, right
-  emit-stack-from-top right, out
+  append-gap-buffer self, out
 }
 
 fn append-gap-buffer _self: (addr gap-buffer), out: (addr stream byte) {