Fix broken markdown cells

The editor wants to create a scoped CKS which you can't do with an Overlay
This commit is contained in:
Rob Lourens 2021-02-13 15:40:29 -08:00
parent 992cf6bd44
commit 3a442c6939

View file

@ -308,9 +308,8 @@ export class StatefulMarkdownCell extends Disposable {
this.templateData.editorContainer.innerText = '';
// create a special context key service that set the inCompositeEditor-contextkey
const editorContextKeyService = this.contextKeyService.createOverlay([
[EditorContextKeys.inCompositeEditor.key, true]
]);
const editorContextKeyService = this.contextKeyService.createScoped(this.templateData.editorPart);
EditorContextKeys.inCompositeEditor.bindTo(editorContextKeyService).set(true);
const editorInstaService = this.instantiationService.createChild(new ServiceCollection([IContextKeyService, editorContextKeyService]));
this.editor = editorInstaService.createInstance(CodeEditorWidget, this.templateData.editorContainer, {