--- a/QScintilla/SearchReplaceWidget.py Sat Jun 11 18:41:30 2011 +0200 +++ b/QScintilla/SearchReplaceWidget.py Sat Jun 11 19:13:39 2011 +0200 @@ -262,6 +262,8 @@ lineFrom, indexFrom, lineTo, indexTo) while ok: tgtPos, tgtLen = aw.getFoundTarget() + if tgtLen == 0: + break aw.setSearchIndicator(tgtPos, tgtLen) ok = aw.findNextTarget() @@ -629,4 +631,4 @@ if aw: aw.setFocus(Qt.ActiveWindowFocusReason) event.accept() - self.close() \ No newline at end of file + self.close()