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(