From 5018e8e9caff5f069595938f925404734cddefa5 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sun, 16 Jul 2006 10:22:04 +0000 Subject: [PATCH] fix bug with choosing "/" from the directory navigator, change color of "/" prefix svn: r3723 original commit: 0dba7be7888765f8e452bae33322c62c37e0f434 --- collects/mred/private/path-dialog.ss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/collects/mred/private/path-dialog.ss b/collects/mred/private/path-dialog.ss index c743eb4c..d82b5daa 100644 --- a/collects/mred/private/path-dialog.ss +++ b/collects/mred/private/path-dialog.ss @@ -297,9 +297,9 @@ (unless (null? items) (let ([j (+ i (string-length (caar items)))]) (when (cdar items) - (send edit change-style path-up-delta i j) + (unless (zero? i) (send edit change-style path-up-delta i j)) (send edit set-clickback i - (if (eq? i 0) j (add1 j)) ; inclucde the sep + (if (zero? i) j (add1 j)) ; inclucde the sep (lambda _ (enter-text (cdar items)) (do-enter)))) (loop j (cdr items))))) (send dir-text lock)) @@ -430,7 +430,7 @@ [selections (send path-list get-selections)] [many? (and multi? (equal? "" sel) (<= 1 (length selections)))]) - (cond [(and isdir? (not (equal? "" sel))) + (cond [(and isdir? (or (not (equal? "" sel)) (root? sel0))) ;; chose a directory -- go there (set-dir path) (send* text* (erase) (select-all)) (set-ok?)] [(and /? isfile?)