Skip to content

Commit

Permalink
Update extensions/git/src/commands.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomoreno authored Sep 9, 2020
1 parent 9ff783b commit bec65e8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions extensions/git/src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1030,10 +1030,10 @@ export class CommandCenter {
return;
}

await this._revertChanges(textEditor, [...changes.slice(0, index), ...changes.slice(index + 1)]).then(() => {
const firstStagedLine = changes[index].modifiedStartLineNumber - 1;
textEditor.selections = [new Selection(firstStagedLine, 0, firstStagedLine, 0)];
});
await this._revertChanges(textEditor, [...changes.slice(0, index), ...changes.slice(index + 1)]);

const firstStagedLine = changes[index].modifiedStartLineNumber - 1;
textEditor.selections = [new Selection(firstStagedLine, 0, firstStagedLine, 0)];
}

@command('git.revertSelectedRanges', { diff: true })
Expand Down

0 comments on commit bec65e8

Please sign in to comment.