diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-01-24 22:26:43 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-01-24 22:26:43 -0800 |
commit | a617d963c3e75bbbf292f4632e11521a1d65a7ac (patch) | |
tree | 8a37920e55018337a7df9af7313b713005c87f34 | |
parent | f54e4ea68a3704ea5dbdff9e3d4b2b89c6f244eb (diff) | |
download | mu-a617d963c3e75bbbf292f4632e11521a1d65a7ac.tar.gz |
609
Shove the complexity of reading newlines as low as possible.
-rw-r--r-- | mu.arc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mu.arc b/mu.arc index bd0e61e0..3e95a0a4 100644 --- a/mu.arc +++ b/mu.arc @@ -678,7 +678,13 @@ ) read-key-from-host (if ($.current-charterm) - (and ($.charterm-byte-ready?) ($.charterm-read-key)) + (and ($.charterm-byte-ready?) + (ret result ($.charterm-read-key) + (case result + ; charterm exceptions + return + (= result #\newline) + ))) ($.graphics-open?) ($.ready-key-press Viewport)) @@ -1976,12 +1982,6 @@ (c:character <- read-key-from-host) ; when we read from a real keyboard we print to screen as well ; later we'll need ways to suppress this - ; exceptions for the charterm library - { begin - (newline?:boolean <- equal c:character ((return literal))) - (break-unless newline?:character) - (c:character <- copy ((#\newline literal))) - } { begin (break-unless c:character) (print-primitive-to-host c:character) |