diff kdiff3/src-QT4/mergeresultwindow.cpp @ 98:236f1c9c3fbf

- Fixed redundant empty line in history merge. - Fixed inconsistency in directory view info area after scan. - Fixed crash if trying to disable "Dir & Text Split Screen View" and no file is loaded. - Fixed test dialog for regular expressions.
author joachim99
date Sat, 15 May 2010 20:36:52 +0000
parents 4e6ebbbae925
children 1b9430d5cf2b
line wrap: on
line diff
--- a/kdiff3/src-QT4/mergeresultwindow.cpp	Sun Mar 28 19:52:18 2010 +0000
+++ b/kdiff3/src-QT4/mergeresultwindow.cpp	Sat May 15 20:36:52 2010 +0000
@@ -1387,6 +1387,14 @@
             if (!mell.empty())
                iMLLStart->mergeEditLineList.splice( iMLLStart->mergeEditLineList.end(), mell, mell.begin(), mell.end() );
          }
+         // If the end of start is empty and the first line at the end is empty remove the last line of start
+         if ( !iMLLStart->mergeEditLineList.empty() && !iMLLEnd->mergeEditLineList.empty() )
+         {
+            QString lastLineOfStart = iMLLStart->mergeEditLineList.back().getString(this);
+            QString firstLineOfEnd = iMLLEnd->mergeEditLineList.front().getString(this);
+            if ( lastLineOfStart.mid(lead.length()).trimmed().isEmpty() && firstLineOfEnd.mid(lead.length()).trimmed().isEmpty() )
+               iMLLStart->mergeEditLineList.pop_back();
+         }
       }
       setFastSelector( iMLLStart );
       update();