mirror of
https://github.com/chylex/IntelliJ-Rainbow-Brackets.git
synced 2025-05-12 06:34:03 +02:00
Fix using wrong color schema issue #2478
This commit is contained in:
parent
ac82ab6ba4
commit
64ded4f5fd
@ -52,13 +52,13 @@ abstract class RainbowHighlightVisitor : HighlightVisitor {
|
||||
startElement: PsiElement?,
|
||||
endElement: PsiElement?) {
|
||||
val holder = highlightInfoHolder ?: return
|
||||
@Suppress("USELESS_ELVIS") val schema = holder.colorsScheme ?: EditorColorsManager.getInstance().globalScheme
|
||||
getHighlightInfo(schema, this, level)
|
||||
val globalScheme = EditorColorsManager.getInstance().globalScheme
|
||||
getHighlightInfo(globalScheme, this, level)
|
||||
?.also {
|
||||
holder.add(it)
|
||||
|
||||
if (startElement != null || endElement != null) {
|
||||
val color: Color? = it.forcedTextAttributesKey?.defaultAttributes?.foregroundColor
|
||||
val color: Color? = globalScheme.getAttributes(it.forcedTextAttributesKey)?.foregroundColor
|
||||
color?.let {
|
||||
parent?.saveRainbowInfo(level, color, startElement, endElement)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user