mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-01-12 22:48:54 +08:00
Merge pull request #2220 from krsoninikhil/empty-logbuffer
eventlog: Override set_focus to check for index error
This commit is contained in:
@@ -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":
|
||||
|
||||
Reference in New Issue
Block a user