Skip to content

Unable to decode ... circle.png in console on first highlight (ST 4215) #38

Open

Description

@dpc00

Claude reports:

Sublime Text 4215, Color Highlight 1.2.4. In a new CSS buffer with #ff0000, rgb(0,128,255) and hsl(120,100%,50%), running "Color Highlight: Color Highlight Current File" prints this in the console:

Unable to decode Packages/User/Color Highlight.cache/col_FF0000FF_circle.png
Unable to decode Packages/User/Color Highlight.cache/col_0080FFFF_circle.png
Unable to decode Packages/User/Color Highlight.cache/col_00FF00FF_circle.png

The files are valid afterwards (232 to 236 bytes, 32x32 RGBA, CRCs correct, zlib data inflates to the expected size). So Sublime tried to load each icon before it was fully written, as the closed issue #17 described. A second run found the files and printed nothing, so the first highlight of a new colour may not show its icon (I did not check the gutter).

Fix idea: write the PNG to a temporary name and rename it into place, and use the icon only after the file exists.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions