Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jface.text/src')
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationDrawingStrategy.java6
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 46268a1f809..adaa340de8f 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
@@ -162,12 +162,16 @@ class InlinedAnnotationDrawingStrategy implements IDrawingStrategy {
* @return the style to apply with GlyphMetrics ascent only if needed.
*/
static StyleRange updateStyle(LineHeaderAnnotation annotation, StyleRange style) {
+ int width= annotation.getRedrawnCharacterWidth();
+ if (width == 0) {
+ // Update GlyphMetrics only when mining was already drawn
+ return null;
+ }
int height= annotation.getHeight();
if (height == 0) {
return null;
}
int fullHeight= height + annotation.getRedrawnCharacterHeight();
- int width= annotation.getRedrawnCharacterWidth();
if (style == null) {
style= new StyleRange();
Position position= annotation.getPosition();

Back to the top