console: implement positions for flow list walker

This papers over an urwid bug until they fix it.

fixes #2973
This commit is contained in:
Aldo Cortesi 2018-05-12 11:05:01 +12:00
parent 482043cdcf
commit a70b50fe3a

View File

@ -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()