Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ export interface CellDiffSingleSideRenderTemplate extends CellDiffCommonRenderTe
readonly metadataInfoContainer: HTMLElement;
readonly outputHeaderContainer: HTMLElement;
readonly outputInfoContainer: HTMLElement;

}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ export class CellDiffSingleSideRenderer implements IListRenderer<SingleSideDiffE
disposeTemplate(templateData: CellDiffSingleSideRenderTemplate): void {
templateData.container.innerText = '';
templateData.sourceEditor.dispose();
templateData.elementDisposables.dispose();
}

disposeElement(element: SingleSideDiffElementViewModel, index: number, templateData: CellDiffSingleSideRenderTemplate): void {
Expand Down Expand Up @@ -275,6 +276,7 @@ export class CellDiffSideBySideRenderer implements IListRenderer<SideBySideDiffE
templateData.container.innerText = '';
templateData.sourceEditor.dispose();
templateData.toolbar?.dispose();
templateData.elementDisposables.dispose();
}

disposeElement(element: SideBySideDiffElementViewModel, index: number, templateData: CellDiffSideBySideRenderTemplate): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ export interface INotebookCellList {
}

export interface BaseCellRenderTemplate {
rootContainer: HTMLElement;
editorPart: HTMLElement;
cellInputCollapsedContainer: HTMLElement;
instantiationService: IInstantiationService;
container: HTMLElement;
cellContainer: HTMLElement;
readonly rootContainer: HTMLElement;
readonly editorPart: HTMLElement;
readonly cellInputCollapsedContainer: HTMLElement;
readonly instantiationService: IInstantiationService;
readonly container: HTMLElement;
readonly cellContainer: HTMLElement;
readonly templateDisposables: DisposableStore;
readonly elementDisposables: DisposableStore;
currentRenderedCell?: ICellViewModel;
Expand All @@ -106,8 +106,8 @@ export interface BaseCellRenderTemplate {
}

export interface MarkdownCellRenderTemplate extends BaseCellRenderTemplate {
editorContainer: HTMLElement;
foldingIndicator: HTMLElement;
readonly editorContainer: HTMLElement;
readonly foldingIndicator: HTMLElement;
currentEditor?: ICodeEditor;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ export class MarkupCellRenderer extends AbstractCellRenderer implements IListRen
}

disposeTemplate(templateData: MarkdownCellRenderTemplate): void {
templateData.templateDisposables.clear();
templateData.elementDisposables.dispose();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I usually just add these to templateDisposables (this one is probably on me)

templateData.templateDisposables.dispose();
}

disposeElement(_element: ICellViewModel, _index: number, templateData: MarkdownCellRenderTemplate): void {
Expand Down