Skip to content
Open
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 @@ -14,6 +14,7 @@
package org.eclipse.jface.text.source;



import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.PaintEvent;
import org.eclipse.swt.events.PaintListener;
Expand Down Expand Up @@ -262,12 +263,13 @@ 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;

final 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);
} else {
fTextWidget.redrawRange(offset, 1, true);
}
Expand Down Expand Up @@ -473,4 +475,4 @@ private boolean searchForCharacters(String text, ICharacterPairMatcherExtension
return false;
}
}
}
}
Loading