@@ -41,7 +41,7 @@ import { CancelCellAction, ChangeCellLanguageAction, ExecuteCellAction, INoteboo
4141import { BaseCellRenderTemplate , CellEditState , CodeCellRenderTemplate , ICellViewModel , INotebookCellList , INotebookEditor , MarkdownCellRenderTemplate , isCodeCellRenderTemplate } from 'vs/workbench/contrib/notebook/browser/notebookBrowser' ;
4242import { CellMenus } from 'vs/workbench/contrib/notebook/browser/view/renderers/cellMenus' ;
4343import { CodeCell } from 'vs/workbench/contrib/notebook/browser/view/renderers/codeCell' ;
44- import { StatefullMarkdownCell } from 'vs/workbench/contrib/notebook/browser/view/renderers/markdownCell' ;
44+ import { StatefulMarkdownCell } from 'vs/workbench/contrib/notebook/browser/view/renderers/markdownCell' ;
4545import { CodeCellViewModel } from 'vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel' ;
4646import { MarkdownCellViewModel } from 'vs/workbench/contrib/notebook/browser/viewModel/markdownCellViewModel' ;
4747import { CellViewModel } from 'vs/workbench/contrib/notebook/browser/viewModel/notebookViewModel' ;
@@ -439,7 +439,8 @@ export class MarkdownCellRenderer extends AbstractCellRenderer implements IListR
439439
440440 this . setBetweenCellToolbarContext ( templateData , element , toolbarContext ) ;
441441
442- const markdownCell = this . instantiationService . createInstance ( StatefullMarkdownCell , this . notebookEditor , element , templateData , this . editorOptions . value , this . renderedEditors ) ;
442+ const scopedInstaService = this . instantiationService . createChild ( new ServiceCollection ( [ IContextKeyService , templateData . contextKeyService ] ) ) ;
443+ const markdownCell = scopedInstaService . createInstance ( StatefulMarkdownCell , this . notebookEditor , element , templateData , this . editorOptions . value , this . renderedEditors ) ;
443444 elementDisposables . add ( this . editorOptions . onDidChange ( newValue => markdownCell . updateEditorOptions ( newValue ) ) ) ;
444445 elementDisposables . add ( markdownCell ) ;
445446
0 commit comments