Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iterate the diffs in each active PR in order #5437

Merged
merged 2 commits into from
Nov 6, 2023

Conversation

ThomsonTan
Copy link
Contributor

For both pr.goToNextDiffInPr and pr.goToPreviousDiffInPr, it tries to scroll the next invisible diff section into the editor view, this makes it not iterating each diff one by one. For example, if there are 3 diff sections in the beginning and all visible, call pr.goToNextDiffInPr scroll the 4th diff into editor view, this makes it a little hard to traverse each diffs.

This PR sets the cursor to each diff while traverses each diff section one by one, without skipping any diff. The new behavior is also consistent with behavior of commands workbench.action.compareEditor.nextChange and workbench.action.compareEditor.previousChange.

Copy link
Member

@alexr00 alexr00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for the change!

@alexr00 alexr00 enabled auto-merge (squash) November 6, 2023 10:14
@alexr00 alexr00 added this to the November 2023 milestone Nov 6, 2023
@alexr00 alexr00 merged commit ec532a6 into microsoft:main Nov 6, 2023
2 checks passed
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.

3 participants