def METHOD_NAME(self, text):
    SearchDialogBase.METHOD_NAME(self, text)
    try:
        first = text.index("sel.first")
    except TclError:
        first = None
    try:
        last = text.index("sel.last")
    except TclError:
        last = None
    first = first or text.index("insert")
    last = last or first
    self.show_hit(first, last)
    self.ok = 1