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

(instead of sexp-based)

closes PR 12421

original commit: 1d03e5f711c26fb06e3110c2124ef2d13a793979
This commit is contained in:
Robby Findler 2011-12-05 17:46:39 -06:00
parent 3d08118a1d
commit 6af85bce99

View File

@ -1376,6 +1376,14 @@
(define-values (start end)
(cond
[(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)
(ormap (λ (pr) (equal? (cdr pr) (string (send text get-character click-pos))))
(racket-paren:get-paren-pairs)))