aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalgorzata Janczarska2012-07-03 07:19:38 (EDT)
committerTomasz Zarna2012-07-03 07:19:38 (EDT)
commit89abaa6f5d2de889ac809d81d969409130d2f0ba (patch)
tree3805616237e853132f6b0d402ec08f5d0e96f415
parentfc4aa1edeabc594d9ce6ded952b16d8e8a77d76a (diff)
downloadeclipse.platform.team-89abaa6f5d2de889ac809d81d969409130d2f0ba.zip
eclipse.platform.team-89abaa6f5d2de889ac809d81d969409130d2f0ba.tar.gz
eclipse.platform.team-89abaa6f5d2de889ac809d81d969409130d2f0ba.tar.bz2
[Navigation] "Previous change" button doesn't work properlyrefs/changes/41/6541/3
Bug: 202435 Change-Id: I35ecbca8d0a22a9e41dc45b3b55a8ee781712542 Signed-off-by: Tomasz Zarna <Tomasz.Zarna@pl.ibm.com>
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/DocumentMerger.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/DocumentMerger.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/DocumentMerger.java
index 463d8d1..81a28fe 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/DocumentMerger.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/DocumentMerger.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -1221,13 +1221,12 @@ public class DocumentMerger {
return fAllDiffs.iterator();
}
- public boolean isFirstChildDiff(char contributor, int startOffset,
- Diff diff) {
+ public boolean isFirstChildDiff(char contributor, int childStart, Diff diff) {
if (!diff.hasChildren())
return false;
Diff d = (Diff)diff.fDiffs.get(0);
Position p= d.getPosition(contributor);
- return (p.getOffset() >= startOffset);
+ return (p.getOffset() >= childStart);
}
public Diff getWrappedDiff(Diff diff, boolean down) {
@@ -1393,7 +1392,7 @@ public class DocumentMerger {
} else if (start >= startOffset) {
// If we are at or before the first diff, select the
// entire diff so next and previous are symmetrical
- if (isFirstChildDiff(contributor, startOffset, diff)) {
+ if (isFirstChildDiff(contributor, start, diff)) {
return diff;
}
d= findPrev(contributor, diff.fDiffs, start, end, deep);