Skip to content

Diffing two empty files shows them as having changes #113318

Closed

Description

@kycutler
  • VSCode Version: 1.51.1
  • OS Version: Windows 10

Steps to Reproduce:

  1. Diff two empty files (or an empty file against itself)
  2. Notice the diff view shows "removed" and "added" lines:

image

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

This behavior is surprising since a file with a single newline shows no differences. So why should an empty file be shown as having differences?

This is important to me because I am using the monaco diff editor, and do not want it to show any differences when both sides are empty.

Activity

  1. added
    bug
    diff-editor
    on Dec 23, 2020
  2. added a commit that references this issue on Dec 31, 2020
    7e77757
  3. added a commit that references this issue on Jan 4, 2021
    13317a9
  4. added
    unreleased
    insiders-released
    and removed
    unreleased
    on Jan 4, 2021
  5. locked and limited conversation to collaborators on Feb 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugdiff-editorinsiders-releasedverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions