make unhighlight-range remove only the first matching range, not
all of the matching ranges original commit: 6d56491e8db5a7c2a4c735155ff1547014c4d371
This commit is contained in:
parent
5bc070d1d8
commit
45eaab276e
|
@ -320,13 +320,19 @@
|
|||
(define color (if (is-a? in-color color%)
|
||||
in-color
|
||||
(send the-color-database find-color in-color)))
|
||||
(define found-one? #f)
|
||||
(unhighlight-ranges
|
||||
(λ (r-start r-end r-color r-caret-space? r-style)
|
||||
(and (equal? start r-start)
|
||||
(equal? end r-end)
|
||||
(equal? color r-color)
|
||||
(equal? caret-space? r-caret-space?)
|
||||
(equal? style r-style)))))
|
||||
(cond
|
||||
[found-one? #f]
|
||||
[(and (equal? start r-start)
|
||||
(equal? end r-end)
|
||||
(equal? color r-color)
|
||||
(equal? caret-space? r-caret-space?)
|
||||
(equal? style r-style))
|
||||
(set! found-one? #t)
|
||||
#t]
|
||||
[else #f]))))
|
||||
|
||||
(define/public (unhighlight-ranges pred)
|
||||
(define left #f)
|
||||
|
|
Loading…
Reference in New Issue
Block a user