adjust the double clicking in racket mode so that clicks on the
(instead of sexp-based) closes PR 12421
This commit is contained in:
parent
4f669f0d7e
commit
1d03e5f711
|
@ -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)))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user