adjust the double clicking in racket mode so that clicks on the

(instead of sexp-based)

closes PR 12421
This commit is contained in:
Robby Findler 2011-12-05 17:46:39 -06:00
parent 4f669f0d7e
commit 1d03e5f711

View File

@ -1376,6 +1376,14 @@
(define-values (start end) (define-values (start end)
(cond (cond
[(equal? token 'string) (word-based)] [(equal? token 'string) (word-based)]
[(and (equal? token 'other)
(let-values ([(start end) (send text get-token-range click-pos)])
(and start
end
(let ([str (send text get-text start end)])
(or (regexp-match? #rx"^#lang" str)
(regexp-match? #rx"^#!" str))))))
(word-based)]
[(and (equal? token 'parenthesis) [(and (equal? token 'parenthesis)
(ormap (λ (pr) (equal? (cdr pr) (string (send text get-character click-pos)))) (ormap (λ (pr) (equal? (cdr pr) (string (send text get-character click-pos))))
(racket-paren:get-paren-pairs))) (racket-paren:get-paren-pairs)))