Patch #1960 2007-04-14 15:24

dmoore

Patch for Bug 10886 (find/replace infinite loop)
Download
1960-Patch_for_Bug.patch (928 bytes)
Category
Application::Bugfix
Status
Accepted
Close date
2007-05-04 09:58
Assigned to
 
Index: src/sdk/editormanager.cpp
===================================================================
--- src/sdk/editormanager.cpp    (revision 3855)
+++ src/sdk/editormanager.cpp    (working copy)
@@ -1491,7 +1491,7 @@
             } else
                 pos=-1;
         }
-        if (pos != -1)
+        if (pos != -1 && data->start!=data->end)
         {
             control->GotoPos(pos);
             control->EnsureVisible(control->LineFromPosition(pos));
@@ -1844,7 +1844,7 @@
                     pos=-1;
             }

-            if (pos == -1)
+            if (pos == -1 || data->start==data->end)
                 break;

             if (confirm)
@@ -2050,7 +2050,7 @@
             } else
                 pos=-1;
         }
-        if (pos != -1)
+        if (pos != -1 && data->start!=data->end)
         {
             control->GotoPos(pos);
             control->EnsureVisible(control->LineFromPosition(pos));
mandrav 2007-05-04 09:58

Patch applied, thank you.