Skip to content

Preserve PR diff scroll position#8618

Open
raashish1601 wants to merge 1 commit intomicrosoft:mainfrom
raashish1601:fix/pr-tree-preserve-scroll-8206
Open

Preserve PR diff scroll position#8618
raashish1601 wants to merge 1 commit intomicrosoft:mainfrom
raashish1601:fix/pr-tree-preserve-scroll-8206

Conversation

@raashish1601
Copy link

Fixes #8206.

Summary:

  • Preserve the visible range when re-selecting a PR diff from the tree.
  • Restore that range when the diff reopens so the scroll position stays stable.

Validation:

  • npm run compile:test
  • npm run compile:node
  • npx eslint src/commands.ts src/view/treeNodes/fileChangeNode.ts src/test/view/fileChangeNode.test.ts
  • npm test could not complete here because the Windows VS Code Insiders binary rejected the extension-host CLI flags in this environment.

Manual risk:

  • The fix is validated by compile/lint coverage, but a quick repro in VS Code Insiders is still the best final confirmation for the extension-host behavior.

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.

Selecting an already opened file in the Pull Request pane resets the scroll position

1 participant