MCPcopy Index your code
hub / github.com/mitmproxy/mitmproxy / CListBox

Class CListBox

mitmproxy/tools/console/help.py:9–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7
8
9class CListBox(urwid.ListBox):
10 def __init__(self, contents):
11 self.length = len(contents)
12 contents = contents[:] + [urwid.Text(["\n"])] * 5
13 super().__init__(contents)
14
15 def keypress(self, size, key):
16 if key == "m_end":
17 self.set_focus(self.length - 1)
18 elif key == "m_start":
19 self.set_focus(0)
20 else:
21 return super().keypress(size, key)
22
23
24class HelpView(tabs.Tabs, layoutwidget.LayoutWidget):

Callers 2

keybindingsMethod · 0.85
filtexpMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…