don't update LayeredLexerEditorHighlighter layers on each editor paint (IDEA-172756)

This commit is contained in:
peter
2017-05-16 21:50:33 +02:00
parent 708cd93d0e
commit 27dee2f8d5
@@ -188,17 +188,8 @@ public class LayeredLexerEditorHighlighter extends LexerEditorHighlighter {
@NotNull
@Override
public HighlighterIterator createIterator(int startOffset) {
// do NOT synchronize before updateLayers due to deadlock with PsiLock
final boolean changed = updateLayers();
//noinspection SynchronizeOnThis
synchronized (this) {
if (changed) {
Document document = getDocument();
if (document != null) {
resetText(document.getImmutableCharSequence());
}
}
return new LayeredHighlighterIteratorImpl(startOffset);
}
}