mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 08:11:00 +00:00
Merge pull request #1423 from dufferzafar/fix-search
Fix console search on Python 3
This commit is contained in:
commit
e9eee5a6da
@ -78,9 +78,9 @@ class Searchable(urwid.ListBox):
|
|||||||
return
|
return
|
||||||
# Start search at focus + 1
|
# Start search at focus + 1
|
||||||
if backwards:
|
if backwards:
|
||||||
rng = xrange(len(self.body) - 1, -1, -1)
|
rng = range(len(self.body) - 1, -1, -1)
|
||||||
else:
|
else:
|
||||||
rng = xrange(1, len(self.body) + 1)
|
rng = range(1, len(self.body) + 1)
|
||||||
for i in rng:
|
for i in rng:
|
||||||
off = (self.focus_position + i) % len(self.body)
|
off = (self.focus_position + i) % len(self.body)
|
||||||
w = self.body[off]
|
w = self.body[off]
|
||||||
|
Loading…
Reference in New Issue
Block a user