more search fixes
This commit is contained in:
parent
4053cb1e16
commit
fcd134eebe
|
@ -1275,9 +1275,9 @@
|
|||
(unless (and to-replace-highlight
|
||||
(= (car to-replace-highlight) next)
|
||||
(= (cdr to-replace-highlight)
|
||||
(+ next (string-length searching-str))))
|
||||
(string-length searching-str)))
|
||||
(replace-highlight->normal-hit)
|
||||
(define pr (cons next (+ next (string-length searching-str))))
|
||||
(define pr (cons next (string-length searching-str)))
|
||||
(unhighlight-hit pr)
|
||||
(highlight-replace pr))]
|
||||
[else
|
||||
|
|
|
@ -67,35 +67,35 @@
|
|||
(send t set-searching-state "aba" #t #f)
|
||||
(send t set-position 0 0)))
|
||||
`(((0 . 3) normal-search-color)
|
||||
((4 . 7) normal-search-color)))
|
||||
((4 . 3) normal-search-color)))
|
||||
(test-search (list '(begin (send t insert "aba aba")
|
||||
(send t set-searching-state "aba" #t #f))
|
||||
'(send t set-position 0 0))
|
||||
`(((0 . 3) normal-search-color)
|
||||
((4 . 7) normal-search-color)))
|
||||
((4 . 3) normal-search-color)))
|
||||
|
||||
|
||||
(test-search (list '(begin (send t insert "abaaba")
|
||||
(send t set-searching-state "aba" #t #f)
|
||||
(send t set-position 0 0)))
|
||||
`(((0 . 3) normal-search-color)
|
||||
((3 . 6) normal-search-color)))
|
||||
((3 . 3) normal-search-color)))
|
||||
(test-search (list '(begin (send t insert "abaaba")
|
||||
(send t set-searching-state "aba" #t #f))
|
||||
'(send t set-position 0 0))
|
||||
`(((0 . 3) normal-search-color)
|
||||
((3 . 6) normal-search-color)))
|
||||
((3 . 3) normal-search-color)))
|
||||
|
||||
(test-search (list '(begin (send t insert "abababa")
|
||||
(send t set-searching-state "aba" #t #f)
|
||||
(send t set-position 0 0)))
|
||||
`(((0 . 3) normal-search-color)
|
||||
((4 . 7) normal-search-color)))
|
||||
((4 . 3) normal-search-color)))
|
||||
(test-search (list '(begin (send t insert "abababa")
|
||||
(send t set-searching-state "aba" #t #f))
|
||||
'(send t set-position 0 0))
|
||||
`(((0 . 3) normal-search-color)
|
||||
((4 . 7) normal-search-color)))
|
||||
((4 . 3) normal-search-color)))
|
||||
|
||||
(test-search (list '(begin (send t insert "Aba")
|
||||
(send t set-searching-state "aba" #t #f)
|
||||
|
@ -131,25 +131,25 @@
|
|||
(send t set-searching-state "aba" #f #t)
|
||||
(send t set-position 0 0)))
|
||||
`(((0 . 3) dark-search-color)
|
||||
((4 . 7) light-search-color)))
|
||||
((4 . 3) light-search-color)))
|
||||
(test-search (list '(begin (send t insert "abababa")
|
||||
(send t set-searching-state "aba" #f #t))
|
||||
'(send t set-position 0 0))
|
||||
`(((0 . 3) dark-search-color)
|
||||
((4 . 7) light-search-color)))
|
||||
((4 . 3) light-search-color)))
|
||||
|
||||
(test-search (list '(begin (send t insert "aba aba aba")
|
||||
(send t set-searching-state "aba" #f #t)
|
||||
(send t set-position 1 1)))
|
||||
`(((0 . 3) light-search-color)
|
||||
((4 . 7) dark-search-color)
|
||||
((8 . 11) light-search-color)))
|
||||
((4 . 3) dark-search-color)
|
||||
((8 . 3) light-search-color)))
|
||||
(test-search (list '(begin (send t insert "aba aba aba")
|
||||
(send t set-searching-state "aba" #f #t))
|
||||
'(send t set-position 1 1))
|
||||
`(((0 . 3) light-search-color)
|
||||
((4 . 7) dark-search-color)
|
||||
((8 . 11) light-search-color)))
|
||||
((4 . 3) dark-search-color)
|
||||
((8 . 3) light-search-color)))
|
||||
|
||||
(test-search (list '(begin (send t insert "aba")
|
||||
(send t set-searching-state "aba" #f #t))
|
||||
|
|
Loading…
Reference in New Issue
Block a user