diff --git a/libmproxy/console/__init__.py b/libmproxy/console/__init__.py index dc551a227..527ed07d0 100644 --- a/libmproxy/console/__init__.py +++ b/libmproxy/console/__init__.py @@ -299,6 +299,7 @@ class ConsoleMaster(flow.FlowMaster): def toggle_eventlog(self): self.eventlog = not self.eventlog + signals.pop_view_state.send(self) self.view_flowlist() def _readflows(self, path): diff --git a/libmproxy/console/flowlist.py b/libmproxy/console/flowlist.py index c7a0d1b74..ffd9dbddf 100644 --- a/libmproxy/console/flowlist.py +++ b/libmproxy/console/flowlist.py @@ -233,8 +233,8 @@ class ConnectionItem(urwid.WidgetWrap): class FlowListWalker(urwid.ListWalker): def __init__(self, master, state): self.master, self.state = master, state - if self.state.flow_count(): - self.set_focus(0) + _, i = self.state.get_focus() + self.set_focus(i) signals.flowlist_change.connect(self.sig_flowlist_change) def sig_flowlist_change(self, sender):