Speed up immediate search results by setting search start position

This commit is contained in:
René Stadler 2007-11-27 13:47:30 +02:00 committed by Stefan Sauer
parent 6f371b8b3a
commit cb6d082f19

View file

@ -198,9 +198,9 @@ class FindBarFeature (FeatureBase):
self.logger.debug ("search string set to '', aborting search") self.logger.debug ("search string set to '', aborting search")
self.sentinel.abort () self.sentinel.abort ()
self.clear_results () self.clear_results ()
# FIXME: Set start position
self.logger.debug ("starting search for %r", search_string) self.logger.debug ("starting search for %r", search_string)
self.operation = SearchOperation (model, search_string) start_path = self.log_view.get_visible_range ()[0]
self.operation = SearchOperation (model, search_string, start_position = start_path[0])
self.sentinel.run_for (self.operation) self.sentinel.run_for (self.operation)
def handle_match_found (self, model, tree_iter): def handle_match_found (self, model, tree_iter):