Cursor at EOL

This commit is contained in:
Tony Garnock-Jones 2014-12-23 11:12:22 -05:00
parent fe7185b321
commit d4689ff9c3
1 changed files with 2 additions and 1 deletions

View File

@ -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)