Show More
@@ -28,8 +28,12 b' def _navseq(step, firststep=None):' | |||||
28 | if firststep: |
|
28 | if firststep: | |
29 | yield firststep |
|
29 | yield firststep | |
30 | if firststep >= 20 and firststep <= 40: |
|
30 | if firststep >= 20 and firststep <= 40: | |
31 |
|
|
31 | firststep = 50 | |
32 | step *= 10 |
|
32 | yield firststep | |
|
33 | assert step > 0 | |||
|
34 | assert firststep > 0 | |||
|
35 | while step <= firststep: | |||
|
36 | step *= 10 | |||
33 | while True: |
|
37 | while True: | |
34 | yield 1 * step |
|
38 | yield 1 * step | |
35 | yield 3 * step |
|
39 | yield 3 * step | |
@@ -53,13 +57,9 b' def revnavgen(pos, pagelen, limit, nodef' | |||||
53 | navbefore = [] |
|
57 | navbefore = [] | |
54 | navafter = [] |
|
58 | navafter = [] | |
55 |
|
59 | |||
56 | last = 0 |
|
|||
57 | for f in _navseq(1, pagelen): |
|
60 | for f in _navseq(1, pagelen): | |
58 | if f < pagelen or f <= last: |
|
|||
59 | continue |
|
|||
60 | if f > limit: |
|
61 | if f > limit: | |
61 | break |
|
62 | break | |
62 | last = f |
|
|||
63 | if pos + f < limit: |
|
63 | if pos + f < limit: | |
64 | navafter.append(("+%d" % f, hex(nodefunc(pos + f).node()))) |
|
64 | navafter.append(("+%d" % f, hex(nodefunc(pos + f).node()))) | |
65 | if pos - f >= 0: |
|
65 | if pos - f >= 0: |
General Comments 0
You need to be logged in to leave comments.
Login now