Skip to content

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

@Mingpan

Description

@Mingpan

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)

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions