about summary refs log tree commit diff stats
path: root/apps/tile/gap-buffer.mu
diff options
context:
space:
mode:
Diffstat (limited to 'apps/tile/gap-buffer.mu')
-rw-r--r--apps/tile/gap-buffer.mu7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/tile/gap-buffer.mu b/apps/tile/gap-buffer.mu
index f4f866a4..47417b96 100644
--- a/apps/tile/gap-buffer.mu
+++ b/apps/tile/gap-buffer.mu
@@ -27,6 +27,13 @@ fn initialize-gap-buffer-with self: (addr gap-buffer), s: (addr array byte) {
   }
 }
 
+fn gap-buffer-to-string self: (addr gap-buffer), out: (addr handle array byte) {
+  var s-storage: (stream byte 0x100)
+  var s/ecx: (addr stream byte) <- address s-storage
+  emit-gap-buffer self, s
+  stream-to-string s, out
+}
+
 fn emit-gap-buffer _self: (addr gap-buffer), out: (addr stream byte) {
   var self/esi: (addr gap-buffer) <- copy _self
   clear-stream out