From b826fbb7239d4182e86b850e127897aee84be6a8 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Tue, 12 Aug 2008 01:09:52 +0000 Subject: [PATCH] PR 9676 svn: r11198 original commit: 712a2c3bf26016e073efdbf92a2844efcfe30436 --- collects/framework/private/text.ss | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/collects/framework/private/text.ss b/collects/framework/private/text.ss index 0e88ec94..c0b681e4 100644 --- a/collects/framework/private/text.ss +++ b/collects/framework/private/text.ss @@ -194,12 +194,16 @@ WARNING: printf is rebound in the body of the unit to always [top #f] [right #f] [bottom #f] - [rectangles rectangles]) + [rectangles rectangles] + [refresh? #f]) (cond [(null? rectangles) (when left (let ([width (- right left)] [height (- bottom top)]) + (when refresh? + (for-each (λ (canvas) (send canvas refresh)) + canvases)) (when (and (> width 0) (> height 0)) (invalidate-bitmap-cache left top width height))))] @@ -222,12 +226,18 @@ WARNING: printf is rebound in the body of the unit to always (min this-top top) (max this-right right) (max this-bottom bottom) - (cdr rectangles)) + (cdr rectangles) + (or refresh? + (not (number? (rectangle-left r))) + (not (number? (rectangle-right r))))) (loop this-left this-top this-right this-bottom - (cdr rectangles))))])))))) + (cdr rectangles) + (or refresh? + (not (number? (rectangle-left r))) + (not (number? (rectangle-right r)))))))])))))) (define/private (recompute-range-rectangles) (let* ([b1 (box 0)] @@ -327,7 +337,8 @@ WARNING: printf is rebound in the body of the unit to always (define/augment (on-reflow) (run-after-edit-sequence - (λ () (recompute-range-rectangles)) + (λ () (unless delayed-highlights? + (recompute-range-rectangles))) 'framework:recompute-range-rectangles) (inner void on-reflow))