|
@ -639,9 +639,9 @@ export class ViewCommands { |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
case Commands.DiffWithPrevious: { |
|
|
case Commands.DiffWithPrevious: { |
|
|
const [uri, args] = command.arguments as [Uri, DiffWithPreviousCommandArgs]; |
|
|
|
|
|
|
|
|
const [, args] = command.arguments as [Uri, DiffWithPreviousCommandArgs]; |
|
|
args.showOptions!.preview = false; |
|
|
args.showOptions!.preview = false; |
|
|
void executeEditorCommand<DiffWithPreviousCommandArgs>(command.command, uri, args); |
|
|
|
|
|
|
|
|
void executeEditorCommand<DiffWithPreviousCommandArgs>(command.command, undefined, args); |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
default: |
|
|
default: |
|
@ -725,13 +725,13 @@ export class ViewCommands { |
|
|
if (!(node instanceof ViewRefFileNode) && !(node instanceof StatusFileNode)) return undefined; |
|
|
if (!(node instanceof ViewRefFileNode) && !(node instanceof StatusFileNode)) return undefined; |
|
|
|
|
|
|
|
|
if (node instanceof StatusFileNode) { |
|
|
if (node instanceof StatusFileNode) { |
|
|
const args: DiffWithWorkingCommandArgs = { |
|
|
|
|
|
|
|
|
return executeEditorCommand<DiffWithWorkingCommandArgs>(Commands.DiffWithWorking, undefined, { |
|
|
|
|
|
uri: node.uri, |
|
|
showOptions: { |
|
|
showOptions: { |
|
|
preserveFocus: true, |
|
|
preserveFocus: true, |
|
|
preview: true, |
|
|
preview: true, |
|
|
}, |
|
|
}, |
|
|
}; |
|
|
|
|
|
return commands.executeCommand(Commands.DiffWithWorking, node.uri, args); |
|
|
|
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return GitActions.Commit.openChangesWithWorking(node.file, { repoPath: node.repoPath, ref: node.ref }); |
|
|
return GitActions.Commit.openChangesWithWorking(node.file, { repoPath: node.repoPath, ref: node.ref }); |
|
@ -748,14 +748,13 @@ export class ViewCommands { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const args: OpenWorkingFileCommandArgs = { |
|
|
|
|
|
|
|
|
void (await executeEditorCommand<OpenWorkingFileCommandArgs>(Commands.OpenWorkingFile, undefined, { |
|
|
uri: node.uri, |
|
|
uri: node.uri, |
|
|
showOptions: { |
|
|
showOptions: { |
|
|
preserveFocus: true, |
|
|
preserveFocus: true, |
|
|
preview: false, |
|
|
preview: false, |
|
|
}, |
|
|
}, |
|
|
}; |
|
|
|
|
|
void (await commands.executeCommand(Commands.OpenWorkingFile, undefined, args)); |
|
|
|
|
|
|
|
|
})); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@debug() |
|
|
@debug() |
|
@ -795,11 +794,10 @@ export class ViewCommands { |
|
|
for (const file of files) { |
|
|
for (const file of files) { |
|
|
const uri = GitUri.fromFile(file, repoPath, ref); |
|
|
const uri = GitUri.fromFile(file, repoPath, ref); |
|
|
|
|
|
|
|
|
const args: OpenWorkingFileCommandArgs = { |
|
|
|
|
|
|
|
|
await executeEditorCommand<OpenWorkingFileCommandArgs>(Commands.OpenWorkingFile, undefined, { |
|
|
uri: uri, |
|
|
uri: uri, |
|
|
showOptions: options, |
|
|
showOptions: options, |
|
|
}; |
|
|
|
|
|
await commands.executeCommand(Commands.OpenWorkingFile, undefined, args); |
|
|
|
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -886,13 +884,12 @@ export class ViewCommands { |
|
|
private openRevisionOnRemote(node: CommitFileNode) { |
|
|
private openRevisionOnRemote(node: CommitFileNode) { |
|
|
if (!(node instanceof CommitFileNode) || node instanceof StashFileNode) return undefined; |
|
|
if (!(node instanceof CommitFileNode) || node instanceof StashFileNode) return undefined; |
|
|
|
|
|
|
|
|
const args: OpenFileOnRemoteCommandArgs = { |
|
|
|
|
|
range: false, |
|
|
|
|
|
}; |
|
|
|
|
|
return commands.executeCommand( |
|
|
|
|
|
|
|
|
return executeEditorCommand<OpenFileOnRemoteCommandArgs>( |
|
|
Commands.OpenFileInRemote, |
|
|
Commands.OpenFileInRemote, |
|
|
node.commit.toGitUri(node.commit.status === 'D'), |
|
|
node.commit.toGitUri(node.commit.status === 'D'), |
|
|
args, |
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
range: false, |
|
|
|
|
|
}, |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|