Skip to content

Commit

Permalink
merge editor - fix regression with editor resolving (#155596)
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Jul 19, 2022
1 parent 54375a0 commit 4b95a2d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 });
}
}
Original file line number Diff line number Diff line change
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

0 comments on commit 4b95a2d

Please sign in to comment.