Shorten strings shown in C-S-o

This commit is contained in:
Sam Tobin-Hochstadt 2014-07-30 16:19:01 -07:00
parent c24a864986
commit 6a62717b8d

View File

@ -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