Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,12 @@ private void draw(final GC gc, final int offset) {
// determine the character width separately, because the getTextBounds above
// will also include any in-line annotations (e.g. codemining annotations) in the width
final String matchingCharacter= fTextWidget.getText(offset, offset);
final int width= gc.textExtent(matchingCharacter).x;

Point sizePoints= gc.textExtent(matchingCharacter);
final int height= fTextWidget.getCaret().getSize().y;
Rectangle rectangleOfFloat= Rectangle.of(new Point(bounds.x, bounds.y + bounds.height - height), sizePoints);

// draw box around line segment
gc.drawRectangle(bounds.x, bounds.y + bounds.height - height, width, height - 1);
gc.drawRectangle(rectangleOfFloat);
Copy link
Contributor

@laeubi laeubi Jan 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need the rectangle of floats here at all? for me the error seems simply to subtract one from the height so a much simpler to remove the -1 from the original code.

gc.drawRectangle(bounds.x, bounds.y + bounds.height - height, width, height);

} else {
fTextWidget.redrawRange(offset, 1, true);
}
Expand Down Expand Up @@ -473,4 +473,4 @@ private boolean searchForCharacters(String text, ICharacterPairMatcherExtension
return false;
}
}
}
}
Loading