diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationRulerColumn.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationRulerColumn.java index 106a6fb1b..57fed27d8 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationRulerColumn.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationRulerColumn.java @@ -191,10 +191,12 @@ public int compare(Tuple o1, Tuple o2) { @Override public void textChanged(TextEvent event) { - if (event.getViewerRedrawState() && fCachedTextWidget.getLineCount() != previousLineCount) { - previousLineCount= fCachedTextWidget.getLineCount(); - postRedraw(); - } + fCachedTextWidget.getDisplay().execute(() -> { + if (event.getViewerRedrawState() && fCachedTextWidget.getLineCount() != previousLineCount) { + previousLineCount= fCachedTextWidget.getLineCount(); + postRedraw(); + } + }); } };