Rename undo-thunks to clear-thunks.
They don't have anything to do with editors' undo.
This commit is contained in:
parent
eda3e70670
commit
c237cee025
|
@ -62,7 +62,7 @@
|
||||||
position-line line-end-position)
|
position-line line-end-position)
|
||||||
|
|
||||||
(define highlights '()) ; (listof `(,start ,end ,popup-fun))
|
(define highlights '()) ; (listof `(,start ,end ,popup-fun))
|
||||||
(define undo-thunks '()) ; list of thunks that undo highlights
|
(define clear-thunks '()) ; list of thunks that clear highlights
|
||||||
(define color-table #f)
|
(define color-table #f)
|
||||||
|
|
||||||
;; filters : Listof (sub-report-entry -> Bool)
|
;; filters : Listof (sub-report-entry -> Bool)
|
||||||
|
@ -118,13 +118,13 @@
|
||||||
(apply max (cons 0 (map report-entry-badness report))))
|
(apply max (cons 0 (map report-entry-badness report))))
|
||||||
(unless (= max-badness 0) ; no missed opts, color table code would error
|
(unless (= max-badness 0) ; no missed opts, color table code would error
|
||||||
(set! color-table (make-color-table max-badness)))
|
(set! color-table (make-color-table max-badness)))
|
||||||
(set! undo-thunks (for/fold ([res '()])
|
(set! clear-thunks (for/fold ([res '()])
|
||||||
([r (in-list report)])
|
([r (in-list report)])
|
||||||
(append (highlight-entry r) res)))
|
(append (highlight-entry r) res)))
|
||||||
(set! on? #t))
|
(set! on? #t))
|
||||||
|
|
||||||
(define/public (clear-highlights)
|
(define/public (clear-highlights)
|
||||||
(for ([h (in-list undo-thunks)]) (h))
|
(for ([h (in-list clear-thunks)]) (h))
|
||||||
(set! highlights '())
|
(set! highlights '())
|
||||||
(send (get-tab) hide-optimization-coach-panel)
|
(send (get-tab) hide-optimization-coach-panel)
|
||||||
(set! on? #f))
|
(set! on? #f))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user