~gcrosswhite/leo-editor/scala-colorizer-patch

« back to all changes in this revision

Viewing changes to leo/core/leoFind.py

  • Committer: Edward K. Ream
  • Date: 2011-06-13 14:00:32 UTC
  • Revision ID: edreamleo@gmail.com-20110613140032-3snllzvu0hg8e7vw
Fixed ancient bug: wrap-around searches should reset when the find-pattern changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
225
225
        # search. We set wrapPosition in selectNextPosition after the first
226
226
        # search fails. We also set wrapPosition on exit if the first search
227
227
        # suceeds.
 
228
        # 
 
229
        # 2011/06/13: wrapPosition must be reset when the find pattern changes.
228
230
        #@@c
229
231
 
230
232
        self.wrapPosition = None # The start of wrapped searches: persists between calls.
1382
1384
        if trace: g.trace('find',repr(s),self.find_ctrl)
1383
1385
        if s and s[-1] in ('\r','\n'):
1384
1386
            s = s[:-1]
 
1387
            
 
1388
        # 2011/06/13: clear wrap_pos if the find_text changes.
 
1389
        if s != self.find_text:
 
1390
            # g.trace('clearing self.wrap_pos')
 
1391
            self.wrapPosition = None
1385
1392
        self.find_text = s
1386
1393
 
1387
1394
        s = self.change_ctrl.getAllText()