about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-01-27 21:50:30 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-01-27 21:50:30 -0800
commitb24bb7dafd4ca97df92c615b978121ca46b543d6 (patch)
tree9accc3efc3fca2438f97b287482bac441cb3cf39
parent1224ed4c875d2b3ead1b564c1a03940cca5027d4 (diff)
downloadmu-b24bb7dafd4ca97df92c615b978121ca46b543d6.tar.gz
646
-rw-r--r--color-repl.mu2
1 files changed, 1 insertions, 1 deletions
diff --git a/color-repl.mu b/color-repl.mu
index 1979ac4f..60b1f8c0 100644
--- a/color-repl.mu
+++ b/color-repl.mu
@@ -13,6 +13,7 @@
   { begin
     next-key
     (c:character <- $wait-for-key-from-host)
+    (len:integer-address <- get-address result:buffer-address/deref length:offset)
     ; handle backspace
     ; test: 3<backspace>4<enter>
     ; todo: backspace into comment or string; backspace past newline
@@ -20,7 +21,6 @@
       (backspace?:boolean <- equal c:character ((#\backspace literal)))
       (break-unless backspace?:boolean)
       ($print-key-to-host c:character)
-      (len:integer-address <- get-address result:buffer-address/deref length:offset)
       ; but only if we need to
       { begin
         (zero?:boolean <- lesser-or-equal len:integer-address/deref 0:literal)