Adds editor options overload to vscode.diff

This commit is contained in:
Eric Amodio
2017-03-30 02:29:54 -04:00
parent b5340dbec3
commit f47a862c1c
2 changed files with 19 additions and 6 deletions

View File

@@ -203,14 +203,15 @@ export class ExtHostApiCommands {
]
});
this._register('vscode.diff', (left: URI, right: URI, label: string) => {
return this._commands.executeCommand('_workbench.diff', [left, right, label]);
this._register('vscode.diff', (left: URI, right: URI, label: string, options?: { preserveFocus?: boolean, pinned?: boolean }) => {
return this._commands.executeCommand('_workbench.diff', [left, right, label, undefined, options]);
}, {
description: 'Opens the provided resources in the diff editor to compare their contents.',
args: [
{ name: 'left', description: 'Left-hand side resource of the diff editor', constraint: URI },
{ name: 'right', description: 'Right-hand side resource of the diff editor', constraint: URI },
{ name: 'title', description: '(optional) Human readable title for the diff editor', constraint: v => v === void 0 || typeof v === 'string' }
{ name: 'title', description: '(optional) Human readable title for the diff editor', constraint: v => v === void 0 || typeof v === 'string' },
{ name: 'options', description: '(optional) Editor options' }
]
});