Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.compare')
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java4
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java4
2 files changed, 4 insertions, 4 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java
index a459aad6b..dfa16c852 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java
@@ -255,7 +255,7 @@ public class Patcher {
lines.add(line);
continue;
case '\\':
- if (line.startsWith("No newline at end of file", 2)) { //$NON-NLS-1$
+ if (line.indexOf("newline at end") > 0) { //$NON-NLS-1$
int lastIndex= lines.size();
if (lastIndex > 0) {
line= (String) lines.get(lastIndex-1);
@@ -268,7 +268,7 @@ public class Patcher {
} else if (lc == '\r') {
end--;
}
- line= line.substring(0, end);
+ line= line.substring(0, end+1);
lines.set(lastIndex-1, line);
}
continue;
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java
index a459aad6b..dfa16c852 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java
@@ -255,7 +255,7 @@ public class Patcher {
lines.add(line);
continue;
case '\\':
- if (line.startsWith("No newline at end of file", 2)) { //$NON-NLS-1$
+ if (line.indexOf("newline at end") > 0) { //$NON-NLS-1$
int lastIndex= lines.size();
if (lastIndex > 0) {
line= (String) lines.get(lastIndex-1);
@@ -268,7 +268,7 @@ public class Patcher {
} else if (lc == '\r') {
end--;
}
- line= line.substring(0, end);
+ line= line.substring(0, end+1);
lines.set(lastIndex-1, line);
}
continue;

Back to the top