diff -r b891bf435f69 Lib/idlelib/SearchDialog.py --- a/Lib/idlelib/SearchDialog.py Fri Apr 05 16:21:39 2013 +0300 +++ b/Lib/idlelib/SearchDialog.py Wed Jul 03 16:11:26 2013 -0400 @@ -32,6 +32,23 @@ if self.find_again(self.text): self.close() + def show_hit(self, first, last): + try: + text = self.text + text.mark_set("insert", first) + text.tag_remove("sel", "1.0", "end") + text.tag_add("sel", first, last) + text.tag_remove("hit", "1.0", "end") + if first == last: + text.tag_add("hit", first) + else: + text.tag_add("hit", first, last) + text.tag_raise("hit") + text.see("insert") + text.update_idletasks() + except Exception: + pass + def find_again(self, text): if not self.engine.getpat(): self.open(text) @@ -56,6 +73,7 @@ text.tag_add("sel", first, last) text.mark_set("insert", self.engine.isback() and first or last) text.see("insert") + self.show_hit(first, last) return True else: text.bell()