From 4c4161ce2bb6ca3e81282d0df27b916349b64a84 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Wed, 30 Jan 2013 11:54:05 -0600 Subject: [PATCH] guard a call to invalidate-bitmap-cache in check syntax so it only happens when something would draw differently --- collects/drracket/private/syncheck/gui.rkt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/collects/drracket/private/syncheck/gui.rkt b/collects/drracket/private/syncheck/gui.rkt index e983425f07..4d6d4cfd05 100644 --- a/collects/drracket/private/syncheck/gui.rkt +++ b/collects/drracket/private/syncheck/gui.rkt @@ -1084,6 +1084,9 @@ If the namespace does not, they are colored the unbound color. (or text-changed? eles-changed? tooltip-changed?)) (define/private (update-drawn-arrows) + (define latent-stuff (let ([im (hash-ref arrow-records latent-text #f)]) (if im (interval-map-ref im latent-pos '()) '()))) + (define cursor-stuff (let ([im (hash-ref arrow-records cursor-text #f)]) (if im (interval-map-ref im cursor-pos '()) '()))) + (set! cursor-pos latent-pos) (set! cursor-text latent-text) (set! cursor-eles latent-eles) @@ -1091,8 +1094,8 @@ If the namespace does not, they are colored the unbound color. (update-tooltip-frame) (update-docs-background cursor-eles) - - (invalidate-bitmap-cache)) + (unless (equal? latent-stuff cursor-stuff) + (invalidate-bitmap-cache))) (define mouse-admin #f) ; editor admin for the last mouse move (define mouse-x #f) ; last known mouse position