markdown: Reset preview scroll for new files - #333464
Merged
Dmitriy Vasyura (dmitrivMS) merged 1 commit intoAug 31, 2026
Merged
Conversation
Fixes #164071 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Dmitriy Vasyura (dmitrivMS)
enabled auto-merge (squash)
August 31, 2026 07:07
Copilot started reviewing on behalf of
Dmitriy Vasyura (dmitrivMS)
August 31, 2026 07:07
View session
This was referenced Aug 31, 2026
Contributor
There was a problem hiding this comment.
Copilot review overview
Review tier: Balanced
Findings: None
What changed in this PR
Resets Markdown preview scrolling when navigating to a different file while preserving explicit line and fragment navigation.
Changes:
- Resets persisted scroll progress to the top for newly opened files.
- Retains existing source-line and fragment behavior.
| File | Description |
|---|---|
extensions/markdown-language-features/preview-src/index.ts |
Resets stale preview scroll progress when switching resources. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Dirk Bäumer (dbaeumer)
approved these changes
Aug 31, 2026
Martin Aeschlimann (aeschli)
approved these changes
Aug 31, 2026
Dmitriy Vasyura (dmitrivMS)
deleted the
fix/markdown-preview-scroll-reset
branch
August 31, 2026 08:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #164071
Validation
npm run build-webview --prefix .\extensions\markdown-language-features