From e0f875412faf08fe8fa78119362fb372461a7a81 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Wed, 10 Jan 2018 21:31:00 -0500 Subject: [PATCH] Fixes renamed files not showing changes from view --- src/commands/diffWith.ts | 2 +- src/views/statusFileNode.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/commands/diffWith.ts b/src/commands/diffWith.ts index 3c5bc01..a11bab0 100644 --- a/src/commands/diffWith.ts +++ b/src/commands/diffWith.ts @@ -86,7 +86,7 @@ export class DiffWithCommand extends ActiveEditorCommand { } async execute(editor?: TextEditor, uri?: Uri, args: DiffWithCommandArgs = {}): Promise { - args = { ...args }; + args = { ...args, lhs: { ...args.lhs }, rhs: { ...args.rhs }, showOptions: { ...args.showOptions} } as DiffWithCommandArgs; if (args.repoPath === undefined || args.lhs === undefined || args.rhs === undefined) return undefined; try { diff --git a/src/views/statusFileNode.ts b/src/views/statusFileNode.ts index 8a3e731..9f48551 100644 --- a/src/views/statusFileNode.ts +++ b/src/views/statusFileNode.ts @@ -79,7 +79,9 @@ export class StatusFileNode extends ExplorerNode { }, rhs: { sha: this.ref2, - uri: this.uri + uri: this.status.status === 'R' + ? GitUri.fromFileStatus(this.status, this.uri.repoPath!, this.ref2, true) + : this.uri }, repoPath: this.uri.repoPath!,