Bug 532682 - Too high bracket box when line height is bigger
Change-Id: I601f715ee8a47fba82c1233d80d12032877741e3
Signed-off-by: Mickael Istria <mistria@redhat.com>
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/MatchingCharacterPainter.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/MatchingCharacterPainter.java
index f7afc6b..1e3f99b 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/MatchingCharacterPainter.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/MatchingCharacterPainter.java
@@ -249,9 +249,10 @@
gc.setForeground(fColor);
Rectangle bounds= fTextWidget.getTextBounds(offset, offset + length - 1);
+ int height= fTextWidget.getCaret().getSize().y;
// draw box around line segment
- gc.drawRectangle(bounds.x, bounds.y, bounds.width - 1, bounds.height - 1);
+ gc.drawRectangle(bounds.x, bounds.y + bounds.height - height, bounds.width - 1, height - 1);
// draw box around character area
// int widgetBaseline= fTextWidget.getBaseline();