Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2007-08-01 13:59:58 +0000
committerMichael Valenta2007-08-01 13:59:58 +0000
commit502d163513efc925911c52b15372589a5be77e97 (patch)
tree65353f8ff18dcdf1dceddb7b7c49038b99c6b51e /bundles
parent62c84c66eafdc7acdd8181809550bc4b9d06c52a (diff)
downloadeclipse.platform.team-502d163513efc925911c52b15372589a5be77e97.tar.gz
eclipse.platform.team-502d163513efc925911c52b15372589a5be77e97.tar.xz
eclipse.platform.team-502d163513efc925911c52b15372589a5be77e97.zip
Bug 178968 [Viewers] Lines scrambled and different font size in compare
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java12
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java12
2 files changed, 14 insertions, 10 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
index d62d126e4..f9b785ebf 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
@@ -11,6 +11,7 @@
* gilles.querret@free.fr - fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=72995
* Max Weninger (max.weninger@windriver.com) - Bug 131895 [Edit] Undo in compare
* Max Weninger (max.weninger@windriver.com) - Bug 72936 [Viewers] Show line numbers in comparision
+ * Matt McCutchen (hashproduct+eclipse@gmail.com) - Bug 178968 [Viewers] Lines scrambled and different font size in compare
*******************************************************************************/
package org.eclipse.compare.contentmergeviewer;
@@ -4164,7 +4165,8 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
if (! fSynchronizedScrolling)
return;
- int lineHeight= fLeft.getTextWidget().getLineHeight();
+ int lineHeightLeft= fLeft.getTextWidget().getLineHeight();
+ int lineHeightRight= fRight.getTextWidget().getLineHeight();
int visibleHeight= fRight.getViewportHeight();
Point size= canvas.getSize();
@@ -4202,12 +4204,12 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
continue;
fLeft.getLineRange(diff.fLeftPos, region);
- int ly= (region.x * lineHeight) + lshift;
- int lh= region.y * lineHeight;
+ int ly= (region.x * lineHeightLeft) + lshift;
+ int lh= region.y * lineHeightLeft;
fRight.getLineRange(diff.fRightPos, region);
- int ry= (region.x * lineHeight) + rshift;
- int rh= region.y * lineHeight;
+ int ry= (region.x * lineHeightRight) + rshift;
+ int rh= region.y * lineHeightRight;
if (Math.max(ly+lh, ry+rh) < 0)
continue;
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
index d62d126e4..f9b785ebf 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
@@ -11,6 +11,7 @@
* gilles.querret@free.fr - fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=72995
* Max Weninger (max.weninger@windriver.com) - Bug 131895 [Edit] Undo in compare
* Max Weninger (max.weninger@windriver.com) - Bug 72936 [Viewers] Show line numbers in comparision
+ * Matt McCutchen (hashproduct+eclipse@gmail.com) - Bug 178968 [Viewers] Lines scrambled and different font size in compare
*******************************************************************************/
package org.eclipse.compare.contentmergeviewer;
@@ -4164,7 +4165,8 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
if (! fSynchronizedScrolling)
return;
- int lineHeight= fLeft.getTextWidget().getLineHeight();
+ int lineHeightLeft= fLeft.getTextWidget().getLineHeight();
+ int lineHeightRight= fRight.getTextWidget().getLineHeight();
int visibleHeight= fRight.getViewportHeight();
Point size= canvas.getSize();
@@ -4202,12 +4204,12 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
continue;
fLeft.getLineRange(diff.fLeftPos, region);
- int ly= (region.x * lineHeight) + lshift;
- int lh= region.y * lineHeight;
+ int ly= (region.x * lineHeightLeft) + lshift;
+ int lh= region.y * lineHeightLeft;
fRight.getLineRange(diff.fRightPos, region);
- int ry= (region.x * lineHeight) + rshift;
- int rh= region.y * lineHeight;
+ int ry= (region.x * lineHeightRight) + rshift;
+ int rh= region.y * lineHeightRight;
if (Math.max(ly+lh, ry+rh) < 0)
continue;

Back to the top