diff options
Diffstat (limited to 'qp.scm')
-rw-r--r-- | qp.scm | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -80,14 +80,17 @@ (qp-string (lambda (str room) + (define len (string-length str)) + (define mid (quotient (- room 3) 2)) (cond - ((>= (string-length str) room 3) - (display (substring str 0 (- room 3))) + ((>= len room 3) + (display (substring str 0 (- room 3 mid))) (display "...") + (display (substring str (- len mid) len)) room) (else (display str) - (string-length str))))) + len)))) (qp-obj (lambda (obj room) |