From d4689ff9c310abf47d6d256870fcf0f2284e8e65 Mon Sep 17 00:00:00 2001
From: Tony Garnock-Jones <tonygarnockjones@gmail.com>
Date: Tue, 23 Dec 2014 11:12:22 -0500
Subject: [PATCH] Cursor at EOL

---
 rmacs/render.rkt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/rmacs/render.rkt b/rmacs/render.rkt
index e1e93a5..14ee4f4 100644
--- a/rmacs/render.rkt
+++ b/rmacs/render.rkt
@@ -65,7 +65,8 @@
              (cursor-input-pos cursor-input-pos)
              (acc-rev '())
              (cursor-offset (if (zero? cursor-input-pos) 0 #f)))
-    (define (finish) (values (list->string (reverse acc-rev)) cursor-offset))
+    (define (finish) (values (list->string (reverse acc-rev))
+                             (if (zero? cursor-input-pos) (length acc-rev) cursor-offset)))
     (match chars
       ['() (finish)]
       [(cons c rest)