PR 8268: fixed the symptom, but there is still some question if the syntax colorer's behavior should change

svn: r4312
This commit is contained in:
Robby Findler 2006-09-11 15:05:39 +00:00
parent c9653c888b
commit 5227ee4d12
5 changed files with 20 additions and 14 deletions

View File

@ -745,7 +745,6 @@ profile todo:
(inherit get-top-level-window) (inherit get-top-level-window)
(define/augment (after-many-evals) (define/augment (after-many-evals)
(printf "updating test coverage\n")
(when test-coverage-info (when test-coverage-info
(send (get-context) show-test-coverage-annotations (send (get-context) show-test-coverage-annotations
test-coverage-info test-coverage-info
@ -840,6 +839,7 @@ profile todo:
(set! ask-about-reset? ask?) (set! ask-about-reset? ask?)
(let* ([edit-sequence-ht (make-hash-table)] (let* ([edit-sequence-ht (make-hash-table)]
[locked-ht (make-hash-table)] [locked-ht (make-hash-table)]
[already-frozen-ht (make-hash-table)]
[actions-ht (make-hash-table 'equal)] [actions-ht (make-hash-table 'equal)]
[on/syntaxes (hash-table-map ht (λ (_ pr) pr))] [on/syntaxes (hash-table-map ht (λ (_ pr) pr))]
@ -931,11 +931,13 @@ profile todo:
(internal-clear-test-coverage-display) (internal-clear-test-coverage-display)
(set! internal-clear-test-coverage-display #f)) (set! internal-clear-test-coverage-display #f))
;; freeze the colorers (possibly re-freeze them) ;; freeze the colorers, but avoid a second freeze (so we can avoid a second thaw)
(hash-table-for-each (hash-table-for-each
edit-sequence-ht edit-sequence-ht
(λ (src _) (λ (src _)
(send src freeze-colorer))) (if (send src is-frozen?)
(hash-table-put! already-frozen-ht src #t)
(send src freeze-colorer))))
;; set new annotations ;; set new annotations
(for-each (for-each
@ -986,10 +988,11 @@ profile todo:
(hash-table-for-each (hash-table-for-each
edit-sequence-ht edit-sequence-ht
(λ (txt _) (λ (txt _)
(unless (hash-table-get already-frozen-ht txt #f)
(let ([locked? (send txt is-locked?)]) (let ([locked? (send txt is-locked?)])
(when locked? (send txt lock #f)) (when locked? (send txt lock #f))
(send txt thaw-colorer) (send txt thaw-colorer)
(when locked? (send txt lock #t))) (when locked? (send txt lock #t))))
(send txt end-edit-sequence))))))))) (send txt end-edit-sequence)))))))))
(inherit get-defs) (inherit get-defs)

View File

@ -871,11 +871,10 @@ TODO
(set! prompt-position (get-unread-start-point)) (set! prompt-position (get-unread-start-point))
(reset-region prompt-position 'end))) (reset-region prompt-position 'end)))
(define/augment after-delete (define/augment (after-delete x y)
(lambda (x y)
(unless inserting-prompt? (unless inserting-prompt?
(reset-highlighting)) (reset-highlighting))
(inner (void) after-delete x y))) (inner (void) after-delete x y))
(define/override get-keymaps (define/override get-keymaps
(λ () (λ ()

View File

@ -9,6 +9,8 @@
(lib "default-lexer.ss" "syntax-color") (lib "default-lexer.ss" "syntax-color")
"sig.ss") "sig.ss")
(define original-output-port (current-output-port))
(define (oprintf . args) (apply fprintf original-output-port args))
(provide color@) (provide color@)

View File

@ -380,7 +380,7 @@ WARNING: printf is rebound in the body of the unit to always
(define/augment (after-set-position) (define/augment (after-set-position)
(hide-caret (= (get-start-position) (get-end-position))) (hide-caret (= (get-start-position) (get-end-position)))
(inner (void) after-set-position)) (inner (void) after-set-position))
(super-instantiate ()))) (super-new)))
(define nbsp->space<%> (interface ((class->interface text%)))) (define nbsp->space<%> (interface ((class->interface text%))))
(define nbsp->space-mixin (define nbsp->space-mixin

View File

@ -445,7 +445,9 @@ tracing todo:
(define/augment (capability-value key) (define/augment (capability-value key)
(case key (case key
[(drscheme:special:insert-lambda) #f] [(drscheme:special:insert-lambda) #f]
[else (drscheme:language:get-capability-default key)])) [else (inner (drscheme:language:get-capability-default key)
capability-value
key)]))
(super-new))) (super-new)))