parent
46598bcad2
commit
942693d56b
|
@ -56,9 +56,7 @@ def find(r, w, move=False, direction='next', start=None, end=None):
|
||||||
limit = Point(x + 1 - offset, y)
|
limit = Point(x + 1 - offset, y)
|
||||||
for stuff in app.highlighted_ranges:
|
for stuff in app.highlighted_ranges:
|
||||||
(wz, p1, p2, fg, bg) = stuff
|
(wz, p1, p2, fg, bg) = stuff
|
||||||
#if p1.y == c.y and p1.x == c.x:
|
|
||||||
if p1 == c:
|
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)
|
limit = Point(x + 1 + p2.x - p1.x - 2*offset + 1, y)
|
||||||
break
|
break
|
||||||
indices.reverse()
|
indices.reverse()
|
||||||
|
@ -67,12 +65,10 @@ def find(r, w, move=False, direction='next', start=None, end=None):
|
||||||
for i in indices:
|
for i in indices:
|
||||||
if direction == 'next' and ranges[i][0] > limit:
|
if direction == 'next' and ranges[i][0] > limit:
|
||||||
ranges[i][3] = selected_color
|
ranges[i][3] = selected_color
|
||||||
#assert ranges[i][0] > c, "%r > %r" % (ranges[i][0], c)
|
|
||||||
newc = (ranges[i][0], ranges[i][1])
|
newc = (ranges[i][0], ranges[i][1])
|
||||||
break
|
break
|
||||||
elif direction == 'previous' and ranges[i][1] < limit:
|
elif direction == 'previous' and ranges[i][1] < limit:
|
||||||
ranges[i][3] = selected_color
|
ranges[i][3] = selected_color
|
||||||
#assert ranges[i][1] < c, "%r < %r" % (ranges[i][1], c)
|
|
||||||
newc = (ranges[i][0], ranges[i][1])
|
newc = (ranges[i][0], ranges[i][1])
|
||||||
break
|
break
|
||||||
if ranges and not newc:
|
if ranges and not newc:
|
||||||
|
|
Loading…
Reference in New Issue