From 26bd211592b9962910556850dc339af54342f8e8 Mon Sep 17 00:00:00 2001 From: Aaron Munger <2019016+amunger@users.noreply.github.com> Date: Tue, 31 Mar 2026 13:47:44 -0700 Subject: [PATCH] track disposable (#306933) --- .../notebook/browser/contrib/multicursor/notebookMulticursor.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.ts b/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.ts index 48532bfcff7..28a9ee9abdf 100644 --- a/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.ts +++ b/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.ts @@ -273,8 +273,10 @@ export class NotebookMultiCursorController extends Disposable implements INotebo const textModelRef = await this.textModelService.createModelReference(cell.cellViewModel.uri); const textModel = textModelRef.object.textEditorModel; if (!textModel) { + textModelRef.dispose(); return undefined; } + this.cursorsDisposables.add(textModelRef); const cursorSimpleModel = this.constructCursorSimpleModel(cell.cellViewModel); const converter = this.constructCoordinatesConverter();