change the online check syntax so it doesn't require any preferences to be
set up in the separate place
This commit is contained in:
parent
52a7a96705
commit
469bc6ec00
|
@ -663,9 +663,18 @@ If the namespace does not, they are colored the unbound color.
|
||||||
(when (<= 0 start-pos end-pos (last-position))
|
(when (<= 0 start-pos end-pos (last-position))
|
||||||
(add-to-range/key text start-pos end-pos make-menu key (and key #t)))))
|
(add-to-range/key text start-pos end-pos make-menu key (and key #t)))))
|
||||||
|
|
||||||
(define/public (syncheck:add-background-color text start fin color)
|
(define/public (syncheck:add-background-color text start fin raw-color)
|
||||||
(when arrow-records
|
(when arrow-records
|
||||||
(when (is-a? text text:basic<%>)
|
(when (is-a? text text:basic<%>)
|
||||||
|
;; we adjust the colors over here based on the white-on-black
|
||||||
|
;; preference so we don't have to have the preference set up
|
||||||
|
;; in the other place when running check syntax in online mode.
|
||||||
|
(define color
|
||||||
|
(if (preferences:get 'framework:white-on-black?)
|
||||||
|
(cond
|
||||||
|
[(equal? raw-color "palegreen") "darkgreen"]
|
||||||
|
[else raw-color])
|
||||||
|
raw-color))
|
||||||
(add-to-range/key text start fin (make-colored-region color text start fin) #f #f))))
|
(add-to-range/key text start fin (make-colored-region color text start fin) #f #f))))
|
||||||
|
|
||||||
;; syncheck:add-arrow : symbol text number number text number number boolean -> void
|
;; syncheck:add-arrow : symbol text number number text number number boolean -> void
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
"xref.rkt"
|
"xref.rkt"
|
||||||
framework/preferences)
|
framework/preferences)
|
||||||
|
|
||||||
(preferences:set-default 'framework:white-on-black? #f boolean?)
|
|
||||||
|
|
||||||
(provide go)
|
(provide go)
|
||||||
|
|
||||||
(define obj%
|
(define obj%
|
||||||
|
|
|
@ -1053,9 +1053,7 @@
|
||||||
(define-values (entry-desc path tag) (apply values info))
|
(define-values (entry-desc path tag) (apply values info))
|
||||||
(send defs-text syncheck:add-background-color
|
(send defs-text syncheck:add-background-color
|
||||||
source-editor start fin
|
source-editor start fin
|
||||||
(if (preferences:get 'framework:white-on-black?)
|
"palegreen")
|
||||||
"darkgreen"
|
|
||||||
"palegreen"))
|
|
||||||
(send defs-text syncheck:add-docs-menu
|
(send defs-text syncheck:add-docs-menu
|
||||||
source-editor
|
source-editor
|
||||||
start
|
start
|
||||||
|
|
Loading…
Reference in New Issue
Block a user