diff --git a/search.py b/search.py index d3cd102..3679645 100644 --- a/search.py +++ b/search.py @@ -56,9 +56,7 @@ def find(r, w, move=False, direction='next', start=None, end=None): limit = Point(x + 1 - offset, y) for stuff in app.highlighted_ranges: (wz, p1, p2, fg, bg) = stuff - #if p1.y == c.y and p1.x == c.x: if p1 == c: - #raise Exception, "argh you got me: %d (%d + 1 + %d - %d - %d), %d" % (x + 1 + p2.x - p1.x - offset, x, p2.x, p1.x, offset, y) limit = Point(x + 1 + p2.x - p1.x - 2*offset + 1, y) break indices.reverse() @@ -67,12 +65,10 @@ def find(r, w, move=False, direction='next', start=None, end=None): for i in indices: if direction == 'next' and ranges[i][0] > limit: ranges[i][3] = selected_color - #assert ranges[i][0] > c, "%r > %r" % (ranges[i][0], c) newc = (ranges[i][0], ranges[i][1]) break elif direction == 'previous' and ranges[i][1] < limit: ranges[i][3] = selected_color - #assert ranges[i][1] < c, "%r < %r" % (ranges[i][1], c) newc = (ranges[i][0], ranges[i][1]) break if ranges and not newc: