AtomMaterialUI / color-highlighter

JetBrains plugin to preview colors directly from within the code.
MIT License
42 stars 25 forks source link

Switching inline on or off requires IDE restart #125

Closed OndrejSpanel closed 1 week ago

OndrejSpanel commented 1 year ago

Describe the bug

When I switch to or from inline highlighting, the IDE needs to be restarted for the option to apply.

To Reproduce

  1. Switch from Background to Inline and press OK (I do this in Scala sources).

Expected Behavior

What happens instead

Environment

IntelliJ IDEA 2023.2.1 Preview (Ultimate Edition)
Build #IU-232.9559.10, built on August 10, 2023
Runtime version: 17.0.8+7-b1000.8 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11.0
GC: G1 Young Generation, G1 Old Generation
Memory: 8192M
Cores: 20
Registry:
    search.everywhere.settings=true
    debugger.valueTooltipAutoShowOnSelection=true
    scala.erase.compiler.process.jdk.once=false
    ide.images.show.chessboard=true

Non-Bundled Plugins:
    GLSL (1.24)
    im.plmnt.plugin.greek (3.0)
    com.wakatime.intellij.plugin (14.1.5)
    VisualVMLauncher (1.22.223)
    org.jetbrains.plugins.hocon (2023.1.0)
    com.intellij.ml.llm (232.9613)
    org.exbin.deltahex.intellij (0.2.8.1)
    org.intellij.scala (2023.2.806)
    com.mallowigi.colorHighlighter (16.0.0)

Kotlin: 232-1.9.0-IJ9559.10

Screenshots

After switching highlighting from inline to background:

image

mallowigi commented 1 year ago

You don't need to restart, just close the current tab and reopen it and it should work.

I'm aware of this issue, but this is because the inline highlighting works differently than the other styles. But I think there has to be a solution somewhere. I'll keep this in the backlog.

OndrejSpanel commented 1 year ago

Perhaps some event could be sent to the tab so that it redraws itself completely?