Skip to content

Commit

Permalink
Fix broken markdown cells
Browse files Browse the repository at this point in the history
The editor wants to create a scoped CKS which you can't do with an Overlay
  • Loading branch information
roblourens committed Feb 13, 2021
1 parent 992cf6b commit 3a442c6
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand Down

0 comments on commit 3a442c6

Please sign in to comment.