Fix expansion to common prefix
This commit is contained in:
parent
d222c8aefb
commit
6304312753
|
@ -145,7 +145,8 @@
|
||||||
(else
|
(else
|
||||||
(let ((common-prefix (strings-common-prefix completions)))
|
(let ((common-prefix (strings-common-prefix completions)))
|
||||||
(debug-message "common-prefix is" common-prefix)
|
(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)
|
(list #f completions cursor-index to-complete parsed)
|
||||||
(call-with-values
|
(call-with-values
|
||||||
(lambda ()
|
(lambda ()
|
||||||
|
@ -153,7 +154,8 @@
|
||||||
parsed (lambda (to-complete)
|
parsed (lambda (to-complete)
|
||||||
(display common-prefix))))
|
(display common-prefix))))
|
||||||
(lambda (completed-line cursor-index)
|
(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)
|
(define (strings-common-prefix strs)
|
||||||
|
|
Loading…
Reference in New Issue