From 81ddc29aca44284cd96d63ad842b66e8bf6cb80f Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sat, 19 Jan 2002 02:33:36 +0000 Subject: [PATCH] flashing quotes and bars doesn't move the screen anymore original commit: 6cfda7d2097fdc0f2dfdb1a14b2c25e71b639c11 --- collects/framework/private/scheme.ss | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/collects/framework/private/scheme.ss b/collects/framework/private/scheme.ss index cd89d269..9e5dc430 100644 --- a/collects/framework/private/scheme.ss +++ b/collects/framework/private/scheme.ss @@ -581,6 +581,7 @@ remove-parens-forward) (define (get-limit pos) 0) + (inherit get-visible-position-range) (define (balance-quotes key) (let* ([char (send key get-key-code)]) ;; must be a character because of the mapping setup ;; this function is only bound to ascii-returning keys @@ -590,7 +591,12 @@ [match (scheme-paren:backward-match this start-pos limit backward-cache)]) (when match - (flash-on match (add1 match)))))) + (let ([start-b (box 0)] + [end-b (box 0)] + [to-flash-point (add1 match)]) + (get-visible-position-range start-b end-b #f) + (when (<= (unbox start-b) to-flash-point (unbox end-b)) + (flash-on match (add1 match)))))))) (define (balance-parens key-event) (letrec ([char (send key-event get-key-code)] ;; must be a character. See above.