Skip to content

fix(editor): re-apply Sticky Headings to an open editor - #1031

Merged
PathGao merged 1 commit into
masterfrom
fix-sticky-scroll-live
Oct 26, 2026
Merged

PathGao merged 1 commit into
masterfrom
fix-sticky-scroll-live

Conversation

@PathGao

@PathGao PathGao commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Toggling Sticky Headings in Settings did nothing to an editor that was already open; it only took effect for the next one. stickyScroll was set in the monaco.editor.create() literal only, so the updateOptions effect never re-applied it. It now comes from editorOptionsFromSettings, which both call sites share.

Verified: the new test in editor.test.ts fails with the option moved back out of editorOptionsFromSettings and passes with it; full node/vitest suites and svelte-check green. Not yet clicked through in a built app.

stickyScroll was set only in the monaco.editor.create() literal, so
toggling the setting did nothing until the next editor was created. It now
comes from editorOptionsFromSettings, which the updateOptions effect
re-applies.
@PathGao
PathGao force-pushed the fix-sticky-scroll-live branch from 80a162c to f42fcbe Compare October 26, 2026 07:03
@PathGao
PathGao merged commit c39fafb into master Oct 26, 2026
4 checks passed
@PathGao
PathGao deleted the fix-sticky-scroll-live branch October 26, 2026 11:50
PathGao added a commit that referenced this pull request Oct 26, 2026
Sticky Headings now comes from editorOptionsFromSettings only, so the
moved creation options no longer set it a second time, and the 'option a
setting can change' test covers it instead of skipping it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant