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

Can't revert change that deletes a single empty line in side-by-side diff editor #152165

Closed
Mingpan opened this issue Jun 15, 2022 · 1 comment
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@Mingpan
Copy link
Contributor

Mingpan commented Jun 15, 2022

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.69-insider
  • OS Version: MacOS Monterey

Steps to Reproduce:

  1. Having a side-by-side diff editor
  2. Make a change that removes a single empty line
  3. Try to revert the change with the arrow Arrows to revert changes in side by side diff editor #151826

Screenshot 2022-06-15 at 10 56 31

Due to an inaccurate if check in revertChange method [1], the delete of an empty line is not correctly recognized (sorry about that!)

@hediet

[1]

} else if (change.modifiedEndLineNumber === 0 && originalContent) {
shoud be ... && originalContent != null) instead of just checking ... && originalContent)

@hediet
Copy link
Member

hediet commented Jun 21, 2022

Thanks! It would be awesome if we had some tests for this!

@hediet hediet added this to the June 2022 milestone Jun 21, 2022
@alexdima alexdima added the bug Issue identified by VS Code Team member as probable bug label Jun 27, 2022
@rzhao271 rzhao271 added the verified Verification succeeded label Jun 29, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Aug 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

7 participants