branch: elpa/geiser-racket commit 2e9ecf71b5b68b052a4bd5ecb23903c8590cb4cf Author: Jose Antonio Ortega Ruiz <j...@gnu.org> Commit: Jose Antonio Ortega Ruiz <j...@gnu.org>
Racket: off-by-one bug in module name completions --- geiser/modules.rkt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/geiser/modules.rkt b/geiser/modules.rkt index 0de316c..95219ed 100644 --- a/geiser/modules.rkt +++ b/geiser/modules.rkt @@ -90,8 +90,9 @@ (let ((ext (filename-extension path))) (and ext (or (bytes=? ext #"rkt") (bytes=? ext #"ss")) - (let ((path (path->string path))) - (substring path 0 (- (string-length path) 3)))))) + (let* ((path (path->string path)) + (len (- (string-length path) (bytes-length ext) 1))) + (substring path 0 len))))) (define (visit-module-path path kind acc) (case kind