From 02b44eb8c9f875809ed762edfb8f540f9fef4971 Mon Sep 17 00:00:00 2001 From: Drew Date: Thu, 3 Nov 2016 00:44:47 -0700 Subject: [PATCH] Fix added then staged then deleted files (#855) * Fix unstaged deleted staged added files * Fix key error as well * Fix lint --- src/plugins/GitStatus.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/plugins/GitStatus.tsx b/src/plugins/GitStatus.tsx index f4c94185e..d2c03660a 100644 --- a/src/plugins/GitStatus.tsx +++ b/src/plugins/GitStatus.tsx @@ -64,6 +64,7 @@ const GitStatusFile: React.StatelessComponent = ({ {buttons.map(({buttonText, action}, index) => {buttonText} )} @@ -247,6 +248,15 @@ class GitStatusComponent extends React.Component action: resetFile(file.value), }], }); + unstagedFilesDescriptions.push({ + absolutePath: absolutePath, + path: file.value, + state: "deleted", + buttons: [{ + buttonText: "Add", + action: addFile(file.value), + }], + }); break; case "StagedDeleted": stagedFilesDescriptions.push({