mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 08:11:00 +00:00
console: implement positions for flow list walker
This papers over an urwid bug until they fix it. fixes #2973
This commit is contained in:
parent
482043cdcf
commit
a70b50fe3a
@ -39,6 +39,14 @@ class FlowListWalker(urwid.ListWalker):
|
||||
def __init__(self, master):
|
||||
self.master = master
|
||||
|
||||
def positions(self, reverse=False):
|
||||
# The stub implementation of positions can go once this issue is resolved:
|
||||
# https://github.com/urwid/urwid/issues/294
|
||||
ret = range(len(self.master.view))
|
||||
if reverse:
|
||||
return reversed(ret)
|
||||
return ret
|
||||
|
||||
def view_changed(self):
|
||||
self._modified()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user