Skip to content

Iterate the diffs in each active PR in order#5437

Merged
alexr00 merged 2 commits intomicrosoft:mainfrom
ThomsonTan:FixDiffNavigation
Nov 6, 2023
Merged

Iterate the diffs in each active PR in order#5437
alexr00 merged 2 commits intomicrosoft:mainfrom
ThomsonTan:FixDiffNavigation

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
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