Hi,

In TortoiseMerge, when you search for a whole word, it does not find 
matches that comes after the first partial match in a line.

The patch fix that looking for all posible matches in a line before giving 
up.

Regards,
Javier Payo

-- 
You received this message because you are subscribed to the Google Groups 
"TortoiseSVN-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tortoisesvn-dev/6e9e6e8a-edf0-4125-8c1f-4e70c9b8d23d%40googlegroups.com.
Index: src/TortoiseMerge/BaseView.cpp
===================================================================
--- src/TortoiseMerge/BaseView.cpp	(revision 28854)
+++ src/TortoiseMerge/BaseView.cpp	(working copy)
@@ -5602,6 +5602,10 @@
 
 bool CBaseView::StringFound(const CString& str, SearchDirection srchDir, int& start, int& end) const
 {
+    bool bStringFound;
+    
+    do
+    {
     if (srchDir == SearchPrevious)
     {
         int laststart = -1;
@@ -5616,7 +5620,7 @@
     else
         start = str.Find(m_sFindText, start);
     end = start + m_sFindText.GetLength();
-    bool bStringFound = (start >= 0);
+    bStringFound = (start >= 0);
     if (bStringFound && m_bWholeWord)
     {
         if (start)
@@ -5627,7 +5631,17 @@
             if (str.GetLength() > end)
                 bStringFound = IsWordSeparator(str.Mid(end, 1).GetAt(0));
         }
+
+        if (!bStringFound)
+        {
+            if (srchDir == SearchPrevious)
+                start--;
+            else
+                start = end;
+        }
     }
+    } while (!bStringFound && start >= 0);
+
     return bStringFound;
 }
 

Reply via email to