Skip to content

Exclude editor bottom padding from split scroll sync - #316

Open
PathGao wants to merge 16 commits into
alecdotdev:masterfrom
PathGao:fix/exclude-editor-bottom-padding-from-scroll-sync
Open

Exclude editor bottom padding from split scroll sync#316
PathGao wants to merge 16 commits into
alecdotdev:masterfrom
PathGao:fix/exclude-editor-bottom-padding-from-scroll-sync

Conversation

@PathGao

@PathGao PathGao commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Fixes #315

Monaco keeps blank space below the final line because scrollBeyondLastLine is enabled. The previous synchronization range used scroll height, so that non-content space made the editor’s final document line map to a preview position above its end.

Uses Monaco content height for both directions of split-scroll synchronization while retaining the editor’s scroll-beyond-last-line preference and front-matter segmentation.

Adds a regression assertion that synchronization does not use the padded scroll range.

This is stacked after #314 and its predecessors. Merge the predecessor chain first.

Validated with npm run check (0 errors, 0 warnings), npm test (136 passing), npm run build, and cargo test (21 passing).

@PathGao

PathGao commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

@alecdotdev This is the follow-up for the remaining end-of-document drift reported in #205. It keeps Monaco’s normal bottom-padding preference but removes that padding from the sync calculation. It is stacked after #314 and the predecessors; please review in order.

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.

Exclude Monaco bottom padding from split-scroll synchronization

1 participant