Skip to content

fix(picker): preserve previewed randomized colorscheme state on confirm#2759

Open
AlexanderGolys wants to merge 2 commits intofolke:mainfrom
AlexanderGolys:fix/colorscheme-picker-confirm-preview
Open

fix(picker): preserve previewed randomized colorscheme state on confirm#2759
AlexanderGolys wants to merge 2 commits intofolke:mainfrom
AlexanderGolys:fix/colorscheme-picker-confirm-preview

Conversation

@AlexanderGolys
Copy link

Summary

The colorscheme picker preview already applies the selected colorscheme.

For randomized colorschemes like randomhue, applying :colorscheme
again on confirm can produce a different result than the one shown in
preview.

This changes the confirm path to keep the previewed state instead of
reapplying the colorscheme.

Repro

  1. Open Snacks.picker.colorschemes()
  2. Preview randomhue
  3. Confirm the selection
  4. The final colors differ from the preview

Verification

  1. Preview randomhue
  2. Confirm the selection
  3. The final colors match the preview

Regular deterministic colorschemes continue to behave the same.

@github-actions github-actions bot added picker size/m Medium PR (<50 lines changed) labels Mar 10, 2026
@AlexanderGolys AlexanderGolys changed the title fix(picker): Preserve previewed randomized colorscheme state on confirm fix(picker): preserve previewed randomized colorscheme state on confirm Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

picker size/m Medium PR (<50 lines changed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant