mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +00:00
Override set_focus to check for index error
This commit is contained in:
parent
9c686ca14c
commit
70a0f87570
@ -57,6 +57,10 @@ class LogBufferBox(urwid.ListBox):
|
||||
self.master = master
|
||||
urwid.ListBox.__init__(self, master.logbuffer)
|
||||
|
||||
def set_focus(self, index):
|
||||
if 0 <= index < len(self.master.logbuffer):
|
||||
super().set_focus(index)
|
||||
|
||||
def keypress(self, size, key):
|
||||
key = common.shortcuts(key)
|
||||
if key == "z":
|
||||
|
Loading…
Reference in New Issue
Block a user