File tree 2 files changed +13
-1
lines changed
gui-lib/framework/private
2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -1058,7 +1058,7 @@ added get-regions
1058
1058
(skip-past-token ls position))))))))
1059
1059
1060
1060
(define/private (skip-past-token ls position)
1061
- (define pos (skip-past-token/ls-relative ls position))
1061
+ (define pos (skip-past-token/ls-relative ls (- position (lexer-state-start-pos ls)) ))
1062
1062
(and pos (+ pos (lexer-state-start-pos ls))))
1063
1063
1064
1064
(define/private (skip-past-token/ls-relative ls position)
Original file line number Diff line number Diff line change 12
12
(test-commenting)
13
13
(test-get-matching-paren-string)
14
14
(open-paren-typing)
15
+ (test-forward-match)
15
16
(test-text-balanced)
16
17
(test-highlighting)
17
18
(indentation-tests)
333
334
(check-equal? (text-balanced? "{foo} ((bar) [5.9]) " 0 #f ) #t )
334
335
(check-equal? (text-balanced? "#(1 2 . 3) " 0 #f ) #t ))
335
336
337
+ (define (test-forward-match)
338
+ (define t (new racket:text%))
339
+ (send t insert " (\n " )
340
+ (send t reset-regions '((3 3 ) (5 end)))
341
+ (send t insert "> (f 01234 56 789 2 3\n " )
342
+ (send t freeze-colorer)
343
+ (send t thaw-colorer)
344
+ (check-equal? (send t forward-match 8 (send t last-position)) 13 )
345
+ (check-equal? (send t forward-match 13 (send t last-position)) 16 ))
346
+
347
+
336
348
(define (test-highlighting)
337
349
(preferences:set 'framework:paren-color-scheme 'shades-of-gray )
338
350
(define t (new racket:text%))
You can’t perform that action at this time.
0 commit comments