fix #108765.
This commit is contained in:
parent
59b020a362
commit
0efbfd9190
2 changed files with 7 additions and 2 deletions
|
@ -425,7 +425,7 @@ export class CommandCenter {
|
|||
}
|
||||
|
||||
if (!left) {
|
||||
await commands.executeCommand<void>('vscode.open', right, opts, title);
|
||||
await commands.executeCommand<void>('vscode.open', right, { ...opts, override: resource.type === Status.BOTH_MODIFIED ? false : undefined }, title);
|
||||
} else {
|
||||
await commands.executeCommand<void>('vscode.diff', left, right, title, opts);
|
||||
}
|
||||
|
@ -828,7 +828,10 @@ export class CommandCenter {
|
|||
try {
|
||||
document = await workspace.openTextDocument(uri);
|
||||
} catch (error) {
|
||||
await commands.executeCommand('vscode.open', uri, opts);
|
||||
await commands.executeCommand('vscode.open', uri, {
|
||||
...opts,
|
||||
override: arg instanceof Resource && arg.type === Status.BOTH_MODIFIED ? false : undefined
|
||||
});
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -1183,6 +1183,7 @@ export namespace FoldingRangeKind {
|
|||
|
||||
export interface TextEditorOpenOptions extends vscode.TextDocumentShowOptions {
|
||||
background?: boolean;
|
||||
override?: boolean;
|
||||
}
|
||||
|
||||
export namespace TextEditorOpenOptions {
|
||||
|
@ -1194,6 +1195,7 @@ export namespace TextEditorOpenOptions {
|
|||
inactive: options.background,
|
||||
preserveFocus: options.preserveFocus,
|
||||
selection: typeof options.selection === 'object' ? Range.from(options.selection) : undefined,
|
||||
override: typeof options.override === 'boolean' ? false : undefined
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue