summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-06-05 17:18:40 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-06-05 17:18:40 +0200
commitb0b8e2fd310e97689a3f90781f26b6ae8129e025 (patch)
tree186a44e213116c1cf7d0dbae9f2aec8f859aa2c1
parent99285f865b352ce0658cca3cd4845995af4ea71d (diff)
downloadgeiser-guile-b0b8e2fd310e97689a3f90781f26b6ae8129e025.tar.gz
geiser-guile-b0b8e2fd310e97689a3f90781f26b6ae8129e025.tar.bz2
Racket: off-by-one bug in module name completions
-rw-r--r--scheme/racket/geiser/modules.rkt5
1 files changed, 3 insertions, 2 deletions
diff --git a/scheme/racket/geiser/modules.rkt b/scheme/racket/geiser/modules.rkt
index 0de316c..95219ed 100644
--- a/scheme/racket/geiser/modules.rkt
+++ b/scheme/racket/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