about summary refs log tree commit diff stats
path: root/color-repl.mu
diff options
context:
space:
mode:
Diffstat (limited to 'color-repl.mu')
-rw-r--r--color-repl.mu7
1 files changed, 7 insertions, 0 deletions
diff --git a/color-repl.mu b/color-repl.mu
index aaa7bd58..3042c1cf 100644
--- a/color-repl.mu
+++ b/color-repl.mu
@@ -18,6 +18,12 @@
     next-key
     (c:character <- $wait-for-key-from-host)
     (check-abort c:character)
+    ; check for ctrl-d and exit
+    { begin
+      (eof?:boolean <- equal c:character ((ctrl-d literal)))
+      (break-unless eof?:boolean)
+      (reply nil:literal)
+    }
     ; check for backspace
     ;   test: 3<backspace>4<enter>
     ;   todo: backspace past newline
@@ -302,6 +308,7 @@
   { begin
     (print-primitive-to-host (("anarki> " literal)))
     (s:string-address <- read-sexp)
+    (break-unless s:string-address)
     (retro-mode)  ; print errors cleanly
       (t:string-address <- $eval s:string-address)
     (cursor-mode)