From 9c494558af5404e089f7f20b74a28446074e307c Mon Sep 17 00:00:00 2001 From: mainzelm Date: Wed, 5 Apr 2006 15:55:52 +0000 Subject: [PATCH] Deal with empty lines --- scheme/scheme-commands.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scheme/scheme-commands.scm b/scheme/scheme-commands.scm index c952f33..1bb04f1 100644 --- a/scheme/scheme-commands.scm +++ b/scheme/scheme-commands.scm @@ -6,8 +6,10 @@ (cdr tokens)))) (define (scheme-command-line? command-line) - (char=? (string-ref (string-trim command-line) 0) - command-prefix)) + (let ((trimmed (string-trim command-line))) + (and (> (string-length trimmed) 0) + (char=? (string-ref trimmed 0) + command-prefix)))) (define (eval-scheme-command command args) (case (string->symbol command)