From 0488036009a124e2988401ded7a6e0e9eff13f24 Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Tue, 8 Apr 2025 17:41:33 +0200 Subject: [PATCH] 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 --- .../daemon/impl/BackgroundUpdateHighlightersUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/BackgroundUpdateHighlightersUtil.java b/platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/BackgroundUpdateHighlightersUtil.java index a052c2e62cf9..1b50fd2d77d4 100644 --- a/platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/BackgroundUpdateHighlightersUtil.java +++ b/platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/BackgroundUpdateHighlightersUtil.java @@ -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); }