Skip to content

Commit c558d0a

Browse files
Use stable Y-coordinate for character highlight and adjust height
Anchor rectangle to bounds.y for consistent vertical placement across DPI/zoom, avoid using bounds.height to calculate Y, and increase height by 1px for proper border spacing.
1 parent aede341 commit c558d0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bundles/org.eclipse.jface.text/src/org/eclipse/jface/text/source/MatchingCharacterPainter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ private void draw(final GC gc, final int offset) {
267267
final int height= fTextWidget.getCaret().getSize().y;
268268

269269
// draw box around line segment
270-
gc.drawRectangle(bounds.x, bounds.y + bounds.height - height, width, height - 1);
270+
gc.drawRectangle(bounds.x, bounds.y, width, height + 1);
271271
} else {
272272
fTextWidget.redrawRange(offset, 1, true);
273273
}

0 commit comments

Comments
 (0)