Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge editor - fix regression with editor resolving #155596

Merged
merged 1 commit into from Jul 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -9,6 +9,7 @@ import { localize } from 'vs/nls';
import { ILocalizedString } from 'vs/platform/action/common/action';
import { Action2, MenuId } from 'vs/platform/actions/common/actions';
import { ICommandService } from 'vs/platform/commands/common/commands';
import { EditorResolution } from 'vs/platform/editor/common/editor';
import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
import { IOpenerService } from 'vs/platform/opener/common/opener';
import { API_OPEN_DIFF_EDITOR_COMMAND_ID } from 'vs/workbench/browser/parts/editor/editorCommands';
Expand All @@ -35,7 +36,7 @@ export class OpenMergeEditor extends Action2 {
validatedArgs.input2,
validatedArgs.output,
);
accessor.get(IEditorService).openEditor(input, { preserveFocus: true });
accessor.get(IEditorService).openEditor(input, { preserveFocus: true, override: EditorResolution.DISABLED });
}
}

Expand Down
Expand Up @@ -19,6 +19,7 @@ import { IWorkbenchFileService } from 'vs/workbench/services/files/common/files'
import { URI } from 'vs/base/common/uri';
import { MergeEditorInput } from 'vs/workbench/contrib/mergeEditor/browser/mergeEditorInput';
import { ctxIsMergeEditor } from 'vs/workbench/contrib/mergeEditor/common/mergeEditor';
import { EditorResolution } from 'vs/platform/editor/common/editor';

interface MergeEditorContents {
languageId: string;
Expand Down Expand Up @@ -160,6 +161,6 @@ export class MergeEditorOpenContents extends Action2 {
{ uri: input2Uri, title: 'Input 2', description: 'Input 2', detail: '(from JSON)' },
resultUri,
);
editorService.openEditor(input);
editorService.openEditor(input, { override: EditorResolution.DISABLED });
}
}
Expand Up @@ -60,6 +60,7 @@ import { IUserDataProfilesService } from 'vs/platform/userDataProfile/common/use
import { MergeEditorInput } from 'vs/workbench/contrib/mergeEditor/browser/mergeEditorInput';
import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles';
import { ctxIsMergeEditor } from 'vs/workbench/contrib/mergeEditor/common/mergeEditor';
import { EditorResolution } from 'vs/platform/editor/common/editor';

const CONTEXT_CONFLICTS_SOURCES = new RawContextKey<string>('conflictsSources', '');

Expand Down Expand Up @@ -736,7 +737,7 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
{ title: localize('Theirs', 'Theirs'), description: remoteResourceName, detail: undefined, uri: conflict.remoteResource },
conflict.previewResource,
);
await this.editorService.openEditor(input);
await this.editorService.openEditor(input, { override: EditorResolution.DISABLED });
}
}

Expand Down