From 6304312753c23836310b05ca42bd64e69735cbf8 Mon Sep 17 00:00:00 2001 From: mainzelm Date: Wed, 5 Apr 2006 07:20:16 +0000 Subject: [PATCH] Fix expansion to common prefix --- scheme/completer.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scheme/completer.scm b/scheme/completer.scm index bb0c05d..aa89874 100644 --- a/scheme/completer.scm +++ b/scheme/completer.scm @@ -145,7 +145,8 @@ (else (let ((common-prefix (strings-common-prefix completions))) (debug-message "common-prefix is" common-prefix) - (if (string=? common-prefix "") + (if (<= (string-length common-prefix) + (string-length (to-complete-prefix to-complete))) (list #f completions cursor-index to-complete parsed) (call-with-values (lambda () @@ -153,7 +154,8 @@ parsed (lambda (to-complete) (display common-prefix)))) (lambda (completed-line cursor-index) - (list completed-line completions cursor-index to-complete parsed)))))))))))) + (list completed-line '() + cursor-index to-complete parsed)))))))))))) (define (strings-common-prefix strs)