File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
drracket/drracket/private Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 34293429 [#f (void)]))
34303430
34313431 (define/public (find-matching-tab filename)
3432- (match-define (cons tab ed) (find-matching-tab/which-editor filename))
3433- tab)
3432+ (match (find-matching-tab/which-editor filename)
3433+ [(cons tab ed) tab]
3434+ [#f #f ]))
34343435
34353436 (define/override (editing-this-file? filename)
34363437 (and (find-matching-tab/which-editor filename) #t ))
3437-
3438+
34383439 (define/private (find-matching-tab/which-editor filename)
3440+ ;; filename : (or/c path-string? symbol?) via make-visible and find-matching-tab
3441+ ;; port-name-matches? only works for path? and symbol?, so cast filename
3442+ (define fn-path-id
3443+ (match filename
3444+ [(? string? s) (string->path s)]
3445+ [(? path? p) p]
3446+ [(? symbol? id) id]))
34393447 (for/or ([tab (in-list tabs)])
34403448 (define (try ed)
3441- (and (send ed port-name-matches? filename )
3449+ (and (send ed port-name-matches? fn-path-id )
34423450 (cons tab ed)))
34433451 (or (try (send tab get-defs))
34443452 (try (send tab get-ints)))))
You can’t perform that action at this time.
0 commit comments