about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-01-24 22:19:17 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-01-24 22:19:17 -0800
commit71500e1a5609dcb3b1344ee584de3cae883db45f (patch)
tree0d11d3484088646d766d3f138f54f50ef84b51e0
parent3a0be565881da3da34b2b5cd1bb2b7c6a88a4910 (diff)
downloadmu-71500e1a5609dcb3b1344ee584de3cae883db45f.tar.gz
607
Shove the complexity of printing newlines as low as possible.

Definite instability in that one trace.
-rw-r--r--mu.arc12
1 files changed, 9 insertions, 3 deletions
diff --git a/mu.arc b/mu.arc
index 986c39a0..72869336 100644
--- a/mu.arc
+++ b/mu.arc
@@ -668,7 +668,14 @@
                 print-primitive-to-host
                   (do1 nil
 ;?                        (write (m arg.0))  (pr " => ")  (prn (type (m arg.0)))
-                       ((if ($.current-charterm) $.charterm-display pr) (m arg.0))
+                       (when (no ($.current-charterm))
+                         (pr (m arg.0)))
+                       (when ($.current-charterm)
+                         (caselet x (m arg.0)
+                           #\newline
+                             ($.charterm-newline)
+                           ;else
+                             ($.charterm-display x)))
                        )
                 read-key-from-host
                   (if ($.current-charterm)
@@ -1974,8 +1981,7 @@
   { begin
     (newline?:boolean <- equal c:character ((return literal)))
     (break-unless newline?:character)
-    (cursor-to-next-line)
-    (reply ((#\newline literal)))
+    (c:character <- copy ((#\newline literal)))
   }
   { begin
     (break-unless c:character)