diff --git a/pkgs/drracket-pkgs/drracket/drracket/private/get-module-path.rkt b/pkgs/drracket-pkgs/drracket/drracket/private/get-module-path.rkt index e175782555..e3bd162c83 100644 --- a/pkgs/drracket-pkgs/drracket/drracket/private/get-module-path.rkt +++ b/pkgs/drracket-pkgs/drracket/drracket/private/get-module-path.rkt @@ -3,6 +3,7 @@ racket/contract racket/gui/base string-constants + setup/path-to-relative framework "find-completions.rkt") @@ -139,6 +140,11 @@ (adjust-lb) (update-buttons)) + (define (path->rel-string p alt-racket-info) + (if alt-racket-info + (path->string p) + (path->relative-string/library p))) + (define (adjust-lb) (send lb clear) (unless (equal? (send tf get-value) "") @@ -154,7 +160,7 @@ the-completions) the-completions))] [n (in-naturals)]) - (send lb append (path->string (list-ref i 1))) + (send lb append (path->rel-string (list-ref i 1) alt-racket-info)) ;; data holds a path => open the file ;; data holds a string => add that past the last / in 'tf' ;; when dir?=#t, then data always holds a path