瀏覽代碼

Fixes renamed files not showing changes from view

main
Eric Amodio 6 年之前
父節點
當前提交
e0f875412f
共有 2 個文件被更改,包括 4 次插入2 次删除
  1. +1
    -1
      src/commands/diffWith.ts
  2. +3
    -1
      src/views/statusFileNode.ts

+ 1
- 1
src/commands/diffWith.ts 查看文件

@ -86,7 +86,7 @@ export class DiffWithCommand extends ActiveEditorCommand {
}
async execute(editor?: TextEditor, uri?: Uri, args: DiffWithCommandArgs = {}): Promise<any> {
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 {

+ 3
- 1
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!,

Loading…
取消
儲存