Skip to content

Update Themes - JavaScript.js edge case#17409

Closed
pryrt wants to merge 2 commits intonotepad-plus-plus:masterfrom
pryrt:jsMagicUpdateTheme
Closed

Update Themes - JavaScript.js edge case#17409
pryrt wants to merge 2 commits intonotepad-plus-plus:masterfrom
pryrt:jsMagicUpdateTheme

Conversation

@pryrt
Copy link
Contributor

@pryrt pryrt commented Jan 16, 2026

per #17347 (comment), need to specially handle the colors for old themes that were missing JavaScript.js, otherwise users will think that N++ broke their themes (which used to work due to the magic handling of missing-JavaScript.js-uses-embedded-JavaScript-lexer)

per notepad-plus-plus#17347 (comment), need to specially handle the colors for old themes that were missing JavaScript.js, otherwise users will think that N++ broke their themes (which used to work due to the magic handling of missing-JavaScript.js-uses-embedded-JavaScript-lexer)
@pryrt
Copy link
Contributor Author

pryrt commented Jan 16, 2026

With this new code, I verified:

  • If I started with a theme that was missing javascript.js, it would grab colors from embedded javascript instead of just using the default fg/bg colors for the theme
  • If I started with a theme that had javascript.js, but was missing one or more WordsStyle entries in that lexer, it would grab colors from embedded javascript instead of just the default fg/bg for just those WordsStyle entries

@ozone10, please confirm this works as you expect

Copy link
Member

@donho donho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the unnecessary part.

@ozone10
Copy link
Contributor

ozone10 commented Jan 17, 2026

@pryrt
seems to work. Good job.

@donho donho self-assigned this Jan 17, 2026
@donho donho closed this in 3bdb223 Jan 17, 2026
@pryrt pryrt deleted the jsMagicUpdateTheme branch January 17, 2026 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants