Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Unstaged changes pane loses green background in specific cases #1814

Open
@robertrossmann

Description

@robertrossmann

Prerequisites

Description

With the Unstaged Changes pane open, deleting contents of an untracked file (select all -> delete) and adding them back in a single step (undo last) results in the Unstaged Changes pane to lose the green background.

Steps to Reproduce

  1. Create a new and untracked file and write some contents into it
  2. Open the unstaged changes pane and keep it open
  3. Delete the contents of the new file in a single step (select all -> delete)
  4. Undo last operation (usually cmd/ctrl-z)
  5. Observe Unstaged changes to no longer have green background

Expected behavior:

Green background should be added to all the lines when the file's contents are returned to the file

Actual behavior:

No green background, only text

Reproduces how often:

100% of the time

Versions

Atom    : 1.34.0-beta0
Electron: 2.0.14
Chrome  : 61.0.3163.100
Node    : 8.9.3

Additional Information

Screenshots follow.

Note that I was unable to reproduce this issue when re-inserting a previously deleted contents from an already-tracked file (ie. a diff with red background). The red background always properly returns to the Unstaged changes pane regardless of how many times I try to delete the tracked file's contents and put them back in a single step.

Initial state (correct)

Initial state (correct)

File contents deleted (correct)

File contents deleted (correct)

File contents returned - green background missing (incorrect) ⚠️

Green background missing (incorrect)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions