Fixed a bug in the search & replace widget causing and endless loop [issue19]. 5_1_x

Sat, 11 Jun 2011 19:13:39 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 11 Jun 2011 19:13:39 +0200
branch
5_1_x
changeset 1121
70800aa5de04
parent 1119
6ff6a06ecfa1
child 1124
0663c41e24b9

Fixed a bug in the search & replace widget causing and endless loop [issue19].

QScintilla/SearchReplaceWidget.py file | annotate | diff | comparison | revisions
diff -r 6ff6a06ecfa1 -r 70800aa5de04 QScintilla/SearchReplaceWidget.py
--- 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()

eric ide

mercurial