Index: BaseView.cpp

===================================================================

--- BaseView.cpp	(revision 22779)

+++ BaseView.cpp	(working copy)

@@ -4104,10 +4104,14 @@

     bool bDoit = !m_sMarkedWord.IsEmpty();
     for (int i = 0; i < lineCount; ++i)
     {
-        LPCTSTR line = NULL;
-        if (bDoit && ((line = GetLineChars(i))!=NULL))
+        if (!bDoit)
+            m_arMarkedWordLines.push_back(0);
+
+        CString line = GetLineChars(i);
+
+        if (!line.IsEmpty())
         {
-            m_arMarkedWordLines.push_back(_tcsstr(line, (LPCTSTR)m_sMarkedWord) != NULL);
+            m_arMarkedWordLines.push_back(line.Find(m_sMarkedWord) != -1);
         }
         else
             m_arMarkedWordLines.push_back(0);
@@ -4124,13 +4128,17 @@

     int e = 0;
     for (int i = 0; i < lineCount; ++i)
     {
-        LPCTSTR line = NULL;
-        if (bDoit && ((line = GetLineChars(i))!=NULL))
-        {
-            m_arFindStringLines.push_back(StringFound(line, SearchNext, s, e));
-        }
-        else
-            m_arFindStringLines.push_back(0);
+		if (!bDoit)
+			m_arFindStringLines.push_back(0);
+
+		CString line = GetLineChars(i);
+
+		if (!line.IsEmpty())
+		{
+			m_arFindStringLines.push_back(StringFound((LPCTSTR)line, SearchNext, s, e));
+		}
+		else
+			m_arFindStringLines.push_back(0);
     }
     UpdateLocator();
 }
@@ -4457,7 +4465,6 @@

         if (!diff || !SVNLineDiff::ShowInlineDiff(diff) || !diff->next)
             break;
 
-        bool bModified = true;
         int lineoffset = 0;
         int nTextStartOffset = 0;
         std::map<int, COLORREF> removedPositions;
@@ -4479,12 +4486,12 @@

             {
                 crBkgnd = InlineViewLineDiffColor(nViewLine);
             }
-            else if (bModified || (diffState == DIFFSTATE_EDITED))
+            else
             {
                 crBkgnd = m_ModifiedBk;
             }
 
-            if (bModified && (len < diff->modified_length))
+            if (len < diff->modified_length)
             {
                 removedPositions[nTextStartOffset] = m_InlineRemovedBk;
             }

