mirror of https://github.com/icsharpcode/ILSpy.git
Browse Source
With dark preselected, the first document of a session rendered with a double-converted (washed-out) palette; resources showed it across every token, C# only on tokens outside the hand-authored dark palette. The same definition was registered with the theme manager under two identities: HighlightingManager hands out a delay-loaded wrapper whose members forward to the inner definition that HighlightingService.Load registers during materialization. Registering the wrapper afterwards snapshotted the shared colours AFTER the inner registration had already darkened them, so the snapshot's "light originals" were dark values and the rewrite darkened them a second time. In-session theme switches were unaffected because the first touch happens in Light, where both snapshots are pristine -- which is why the bug only appeared when dark was already active at first touch. Skip registration when the definition is already theme-aware: reading the marker forces the wrapper to materialize, so the check observes the inner registration. This also stops the remap from clobbering definitions whose XSHD opts out via ILSpy.IsThemeAware. Assisted-by: Claude:claude-fable-5:Claude Codepull/3973/head
2 changed files with 75 additions and 0 deletions
Loading…
Reference in new issue