Skip to content

Commit

Permalink
looks like there was a bug in edf5a36
Browse files Browse the repository at this point in the history
  • Loading branch information
rfindler committed Jan 5, 2025
1 parent 470c745 commit 99daf58
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drracket/drracket/private/main.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -1006,6 +1006,9 @@
(list (vector->list (current-command-line-arguments)))
(map list (reverse (vector->list (current-command-line-arguments)))))]))
(define already-warned? #f)

;; (listof (listof ?))
;; each outer list corresponds to a frame; each inner list are the tabs in that frame
(define normalized/filtered
(for/list ([frame-files (in-list files-to-open)])
(for/list ([file (in-list frame-files)])
Expand All @@ -1019,6 +1022,8 @@
(string-constant drscheme)
(format (string-constant cannot-open-because-dne) file)))
#f]))))

;; (listof (listof ?))
(define no-dups (remove-duplicates/falses normalized/filtered))
(define no-empties (filter pair? no-dups))
(cond
Expand All @@ -1043,7 +1048,8 @@
;; opening a file results in an error so we don't actually
;; open it, so `locate-file` returns #f.
(define first-one
(for/or ([nd (in-list no-dups)])
(for*/or ([nds (in-list no-dups)]
[nd (in-list nds)])
(define f (send (group:get-the-frame-group) locate-file nd))
(and f (cons f nd))))
(when first-one
Expand Down

0 comments on commit 99daf58

Please sign in to comment.