diff options
-rw-r--r-- | org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationDrawingStrategy.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationDrawingStrategy.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationDrawingStrategy.java index 1bf8b52feb8..501f9d21eda 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationDrawingStrategy.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationDrawingStrategy.java @@ -189,15 +189,19 @@ class InlinedAnnotationDrawingStrategy implements IDrawingStrategy { // Here we need to redraw this first character because GlyphMetrics clip this // character. String s= textWidget.getText(offset, offset); + int charWidth= gc.stringExtent(s).x; + int charX= x + bounds.width - charWidth; + int charY= y; if (style != null) { if (style.background != null) { gc.setBackground(style.background); + gc.fillRectangle(charX, charY, charWidth + 1, bounds.height); } if (style.foreground != null) { gc.setForeground(style.foreground); } } - gc.drawString(s, bounds.x + bounds.width - gc.stringExtent(s).x, bounds.y, true); + gc.drawString(s, charX, charY, true); } } else { textWidget.redrawRange(offset, length, true); |