do not call highlighter.setAttributes() on LAF change, because it hard-caches forced text attributes, to fix IJPL-175049 Editor updates slowly on the UI theme switch, it creates blinking effect

GitOrigin-RevId: 78fd183555a205623154b7d7363260eeb395838d
This commit is contained in:
Alexey Kudravtsev
2025-04-09 14:23:33 +00:00
committed by intellij-monorepo-bot
parent 4068f1bfeb
commit 0488036009
@@ -311,7 +311,8 @@ public final class BackgroundUpdateHighlightersUtil {
TextAttributesKey textAttributesKey = info.forcedTextAttributesKey == null ? info.type.getAttributesKey() : info.forcedTextAttributesKey;
highlighter.setTextAttributesKey(textAttributesKey);
if (infoAttributes != null) {
if (infoAttributes == TextAttributes.ERASE_MARKER ||
infoAttributes != null && !infoAttributes.equals(highlighter.getTextAttributes(colorsScheme))) {
highlighter.setTextAttributes(infoAttributes);
}