mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-01 22:12:26 +01:00
fixes #62629
This commit is contained in:
@@ -24,6 +24,8 @@ import { ExtHostContext, ExtHostEditorsShape, IApplyEditsOptions, IExtHostContex
|
||||
import { EditorViewColumn, editorGroupToViewColumn, viewColumnToEditorGroup } from 'vs/workbench/api/shared/editor';
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { IEditorGroupsService } from 'vs/workbench/services/group/common/editorGroupsService';
|
||||
import { IURLService } from 'vs/platform/url/common/url';
|
||||
import product from 'vs/platform/node/product';
|
||||
|
||||
export class MainThreadTextEditors implements MainThreadTextEditorsShape {
|
||||
|
||||
@@ -264,6 +266,7 @@ CommandsRegistry.registerCommand('_workbench.open', function (accessor: Services
|
||||
const editorService = accessor.get(IEditorService);
|
||||
const editorGroupService = accessor.get(IEditorGroupsService);
|
||||
const openerService = accessor.get(IOpenerService);
|
||||
const urlService = accessor.get(IURLService);
|
||||
|
||||
const [resource, options, position, label] = args;
|
||||
|
||||
@@ -277,6 +280,10 @@ CommandsRegistry.registerCommand('_workbench.open', function (accessor: Services
|
||||
return Promise.resolve(void 0);
|
||||
}
|
||||
|
||||
if (resource && (resource.scheme === product.urlProtocol || /^vscode/.test(resource.scheme))) {
|
||||
return urlService.open(resource).then(_ => void 0);
|
||||
}
|
||||
|
||||
// finally, delegate to opener service
|
||||
return openerService.open(resource).then(_ => void 0);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user