From 5a789cee5ef27eab0efe6dc54986b064a0cf3be0 Mon Sep 17 00:00:00 2001 From: AprilViolet Date: Sat, 11 Sep 2021 09:35:28 +0800 Subject: [PATCH] :bug: fix(1.2.0): fix the failure of setting custom colors in gutter --- .../highlighter/AbstractBracketHighlighter.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/cn/aprilviolet/highlightbracketpair/highlighter/AbstractBracketHighlighter.java b/src/main/java/cn/aprilviolet/highlightbracketpair/highlighter/AbstractBracketHighlighter.java index c225e7d..2b5256b 100644 --- a/src/main/java/cn/aprilviolet/highlightbracketpair/highlighter/AbstractBracketHighlighter.java +++ b/src/main/java/cn/aprilviolet/highlightbracketpair/highlighter/AbstractBracketHighlighter.java @@ -64,6 +64,8 @@ abstract public class AbstractBracketHighlighter { public static final String RIGHT_BRACKET = "}"; + public static final String BRACE_ATTR_GUTTER = "|"; + public AbstractBracketHighlighter(Editor editor) { this.editor = editor; this.project = this.editor.getProject(); @@ -161,7 +163,7 @@ public Pair renderBracesInGutter(BracePair b HighlightBracketPairSettingsPage.getTextAttributesKeyByToken(leftBrace.getElementType()); // if not found, get the text attr by brace text if (textAttributesKey == null) { - textAttributesKey = HighlightBracketPairSettingsPage.getTextAttributesKeyByText(leftBraceText); + textAttributesKey = HighlightBracketPairSettingsPage.getTextAttributesKeyByText(BRACE_ATTR_GUTTER); } final TextAttributes textAttributes = editor.getColorsScheme().getAttributes(textAttributesKey);