diff options
-rw-r--r-- | libmproxy/console/__init__.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libmproxy/console/__init__.py b/libmproxy/console/__init__.py index 052ac7dd..cbcba52f 100644 --- a/libmproxy/console/__init__.py +++ b/libmproxy/console/__init__.py @@ -100,9 +100,12 @@ class ConsoleState(flow.State): return ret def clear(self): - self.focus = None super(ConsoleState, self).clear() - + if len(self.flows.views) == 0: + self.focus = None + else: + self.focus = 0 + self.set_focus(self.focus) class Options(object): attributes = [ |