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)