diff --git a/collects/framework/editor.ss b/collects/framework/editor.ss index 2e6670e8..3f25b6d4 100644 --- a/collects/framework/editor.ss +++ b/collects/framework/editor.ss @@ -257,13 +257,12 @@ [update-filename (lambda (name) (let ([filename (if name - (let-values ([(base name dir) (split-path (mzlib:file:normalize-path name))]) - name) + (mzlib:file:file-name-from-path (mzlib:file:normalize-path name)) "")]) (for-each (lambda (canvas) (let ([tlw (send canvas get-top-level-window)]) (when (is-a? tlw frame:editor<%>) - (send tlw set-label name)))) + (send tlw set-label filename)))) (get-canvases))))]) (override [after-save-file diff --git a/collects/framework/finder.ss b/collects/framework/finder.ss index faca69c5..847e8b4b 100644 --- a/collects/framework/finder.ss +++ b/collects/framework/finder.ss @@ -139,7 +139,9 @@ file-filter s)) (cons s rest)] [else rest]))))) - (if (eq? (system-type) 'unix) string= pos num-items) - (let ([first-char (string-ref (get-string pos) 0)]) - (if (char=? code first-char) - (set-selection-and-edit pos) - (loop (add1 pos))))))] + (let ([next-matching + (let loop ([pos (add1 curr-pos)]) + (cond + [(>= pos num-items) #f] + [else + (let ([first-char (string-ref (get-string pos) 0)]) + (if (char-ci=? code first-char) + pos + (loop (add1 pos))))]))]) + (if next-matching + (set-selection-and-edit next-matching) + + ;; didn't find anything forward; start again at front of list + (let loop ([pos 0] + [last-before 0]) + (cond + [(<= pos num-items) + (let ([first-char (string-ref (get-string pos) 0)]) + (cond + [(char-ci=? code first-char) + (set-selection-and-edit pos)] + [(char-ci<=? first-char code) + (loop (+ pos 1) + pos)] + [else + (set-selection-and-edit last-before)]))] + [else (set-selection-and-edit last-before)]))))] ; movement keys [(and (eq? code 'up) diff --git a/collects/framework/frame.ss b/collects/framework/frame.ss index 2b895e0b..e155ba8f 100644 --- a/collects/framework/frame.ss +++ b/collects/framework/frame.ss @@ -14,7 +14,8 @@ [pasteboard : framework:pasteboard^] [editor : framework:editor^] [canvas : framework:canvas^] - [mzlib:function : mzlib:function^]) + [mzlib:function : mzlib:function^] + [mzlib:file : mzlib:file^]) (rename [-editor<%> editor<%>] [-pasteboard% pasteboard%] @@ -177,9 +178,7 @@ (send (get-editor) on-close))]) (private [label (if file-name - (let-values ([(base name dir?) (split-path file-name)]) - (or name - file-name)) + (mzlib:file:file-name-from-path file-name) (gui-utils:next-untitled-name))] [label-prefix (application:current-app-name)] [do-label @@ -317,12 +316,13 @@ (format "Welcome to ~a" (application:current-app-name))))] [help-menu:about-string (lambda () (application:current-app-name))]) - (sequence (apply super-init - (get-entire-label) - parent - width - height - args)) + (sequence + (apply super-init + (get-entire-label) + parent + width + height + args)) (public [get-canvas (let ([c #f]) diff --git a/collects/framework/scheme.ss b/collects/framework/scheme.ss index 2b135b24..4f1eee14 100644 --- a/collects/framework/scheme.ss +++ b/collects/framework/scheme.ss @@ -920,8 +920,8 @@ (map-meta "c:b" "backward-sexp") (map-meta "s:c:b" "select-backward-sexp") - (map-meta "c:u" "up-sexp") - (map-meta "c:d" "down-sexp") + ;(map-meta "c:u" "up-sexp") + ;(map-meta "c:d" "down-sexp") (map-meta "c:p" "flash-backward-sexp") (map-meta "s:c:n" "flash-forward-sexp")