提交 eac1ceea 编写于 作者: J Johannes Rieken

fix integration test failure,don't always trust default values...

上级 4c969458
......@@ -28,11 +28,11 @@ import {SyncDescriptor} from 'vs/platform/instantiation/common/descriptors';
KeybindingsRegistry.registerCommandDesc({
id: '_workbench.previewHtml',
weight: KeybindingsRegistry.WEIGHT.workbenchContrib(0),
handler(accessor: ServicesAccessor, resource: URI | string, position?: EditorPosition, title: { label?: string; description?: string } = {}) {
handler(accessor: ServicesAccessor, resource: URI | string, position?: EditorPosition, title?: { label?: string; description?: string }) {
let uri = resource instanceof URI ? resource : URI.parse(resource);
let {label, description} = title;
let input = accessor.get(IInstantiationService).createInstance(HtmlInput, label || uri.fsPath, description, uri);
let {label, description} = !title ? { label: uri.fsPath, description: void 0 } : title;
let input = accessor.get(IInstantiationService).createInstance(HtmlInput, label, description, uri);
return accessor.get(IWorkbenchEditorService)
.openEditor(input, { pinned: true }, position)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册