fix thaw-colorer, as reflected in restoring coloring in an edtor after test-coverage coloring

svn: r15651
This commit is contained in:
Matthew Flatt 2009-08-01 02:31:51 +00:00
parent 1bf2520388
commit 021a65020f

View File

@ -559,19 +559,21 @@ added get-regions
(else (else
(begin-edit-sequence #f #f) (begin-edit-sequence #f #f)
(finish-now) (finish-now)
(for-each (when should-color?
(lambda (ls) (for-each
(let ([tokens (lexer-state-tokens ls)] (lambda (ls)
[start-pos (lexer-state-start-pos ls)]) (let ([tokens (lexer-state-tokens ls)]
(send tokens for-each [start-pos (lexer-state-start-pos ls)])
(λ (start len type) (send tokens for-each
(when (and should-color? (should-color-type? type)) (λ (start len data)
(let ((color (send (get-style-list) find-named-style (let ([type (data-type data)])
(token-sym->style type))) (when (should-color-type? type)
(sp (+ start-pos start)) (let ((color (send (get-style-list) find-named-style
(ep (+ start-pos (+ start len)))) (token-sym->style type)))
(change-style color sp ep #f))))))) (sp (+ start-pos start))
lexer-states) (ep (+ start-pos (+ start len))))
(change-style color sp ep #f))))))))
lexer-states))
(end-edit-sequence)))))))) (end-edit-sequence))))))))