From a34eeb9a281fa4cd036d2ede096dbe44f78ab1d2 Mon Sep 17 00:00:00 2001 From: Jake Drahos Date: Thu, 11 Jun 2015 11:49:23 -0500 Subject: [PATCH] Fixed console rendering bug Clearing all flows now works properly --- libmproxy/console/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libmproxy/console/__init__.py b/libmproxy/console/__init__.py index 052ac7dda..cbcba52ff 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 = [