From dc4a74ddf399c0e8638f50c801ae66c482f043c4 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Wed, 30 Jan 2013 15:11:01 -0600 Subject: [PATCH] fix bug in commit 4c4161ce2bb6ca3e81282d0df27b916349b64a84 --- collects/drracket/private/syncheck/gui.rkt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/collects/drracket/private/syncheck/gui.rkt b/collects/drracket/private/syncheck/gui.rkt index 4d6d4cfd05..4c79141a5b 100644 --- a/collects/drracket/private/syncheck/gui.rkt +++ b/collects/drracket/private/syncheck/gui.rkt @@ -1084,8 +1084,8 @@ 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 '()) '()))) + (define latent-stuff (fetch-arrow-records latent-text latent-pos)) + (define cursor-stuff (fetch-arrow-records cursor-text cursor-pos)) (set! cursor-pos latent-pos) (set! cursor-text latent-text) @@ -1097,6 +1097,13 @@ If the namespace does not, they are colored the unbound color. (unless (equal? latent-stuff cursor-stuff) (invalidate-bitmap-cache))) + (define/private (fetch-arrow-records txt pos) + (and arrow-records + (let ([im (hash-ref arrow-records txt #f)]) + (if im + (interval-map-ref im pos '()) + '())))) + (define mouse-admin #f) ; editor admin for the last mouse move (define mouse-x #f) ; last known mouse position (define mouse-y #f)