From a4b059c2a7ebe4e03abedd63f297d359509347d6 Mon Sep 17 00:00:00 2001 From: Pedro Worcel Date: Thu, 26 Dec 2013 21:53:04 +1300 Subject: fix bug that happens after searching for a non-existant string, and later for an existant one. --- libmproxy/console/flowview.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libmproxy/console/flowview.py') diff --git a/libmproxy/console/flowview.py b/libmproxy/console/flowview.py index 20ef864e..b0931fa2 100644 --- a/libmproxy/console/flowview.py +++ b/libmproxy/console/flowview.py @@ -327,7 +327,12 @@ class FlowView(common.WWrap): if search_string == last_search_string: start_line = self.state.get_flow_setting(self.flow, "last_find_line") start_index = self.state.get_flow_setting(self.flow, - "last_search_index") + len(search_string) + "last_search_index") + + if start_index != None: + start_index += len(search_string) + else: + start_index = 0 else: self.state.add_flow_setting(self.flow, "last_search_string", search_string) -- cgit v1.2.3