From 16c4a2489c86c7ce1b5fae9fffcc107f59c3327c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Thu, 7 Nov 2024 12:16:57 +0100 Subject: [PATCH] fix: properly restore model on editor disposal --- src/tools.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tools.ts b/src/tools.ts index 3f0e54f..67b6e73 100644 --- a/src/tools.ts +++ b/src/tools.ts @@ -176,6 +176,7 @@ export function lockCodeWithoutDecoration ( } disposableStore.add(editor.onDidChangeModel(lockModel)) lockModel() + disposableStore.add(editor.onDidDispose(() => restoreModel?.())) // Handle selection of the last line of an editable range disposableStore.add(