fix bug in commit 4c4161ce2b

This commit is contained in:
Robby Findler 2013-01-30 15:11:01 -06:00
parent 6f2ff6af49
commit dc4a74ddf3

View File

@ -1084,8 +1084,8 @@ If the namespace does not, they are colored the unbound color.
(or text-changed? eles-changed? tooltip-changed?)) (or text-changed? eles-changed? tooltip-changed?))
(define/private (update-drawn-arrows) (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 latent-stuff (fetch-arrow-records latent-text latent-pos))
(define cursor-stuff (let ([im (hash-ref arrow-records cursor-text #f)]) (if im (interval-map-ref im cursor-pos '()) '()))) (define cursor-stuff (fetch-arrow-records cursor-text cursor-pos))
(set! cursor-pos latent-pos) (set! cursor-pos latent-pos)
(set! cursor-text latent-text) (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) (unless (equal? latent-stuff cursor-stuff)
(invalidate-bitmap-cache))) (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-admin #f) ; editor admin for the last mouse move
(define mouse-x #f) ; last known mouse position (define mouse-x #f) ; last known mouse position
(define mouse-y #f) (define mouse-y #f)