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

The Diff Editor "Next Change" action does not loop if there is a difference in the new line at the end of the files #215925

Open
hb20007 opened this issue Jun 17, 2024 · 0 comments · May be fixed by #219321
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug diff-editor Diff editor issues help wanted Issues identified as good community contribution opportunities

Comments

@hb20007
Copy link

hb20007 commented Jun 17, 2024

Does this issue occur when all extensions are disabled? Yes

I am able to reproduce this issue on Windows with the latest build as well as on the Insiders Build on the web using https://insiders.vscode.dev/.

Steps to Reproduce

  1. Create 2 files to diff. One file should end with a new line and the other shouldn't.

Example:

file1.txt

This is the 1st sentence.

This is the second one.

This is number 3.

file2.txt

This is the first sentence.

This is the second one.

This is number 3.
  1. Use the "Next Change" action to cycle through the changes. Notice how it does not loop back to the beginning after reaching the last difference between the files, which is the end of file new line.

More Info

The "Previous Change" action works correctly and loops to the last difference when at the first difference. Also, the "Next Change" looping back to the first difference works correctly if the last difference is not a new line.

Why does it matter?

It might seem like a minor issue, but I need to diff large files where often one of the files is missing the new line at the end. If I use "Previous Change" at the beginning of the files, I am taken to the last difference at the end of the files, and I cannot use "Next Change" to go back to the start.

@hediet hediet added bug Issue identified by VS Code Team member as probable bug diff-editor Diff editor issues help wanted Issues identified as good community contribution opportunities labels Jun 25, 2024
charles7668 added a commit to charles7668/vscode that referenced this issue Jul 1, 2024
@charles7668 charles7668 linked a pull request Jul 1, 2024 that will close this issue
charles7668 added a commit to charles7668/vscode that referenced this issue Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug diff-editor Diff editor issues help wanted Issues identified as good community contribution opportunities
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants