Skip to content

Commit c9e81fb

Browse files
authored
Use disposable in autorun (microsoft#257211)
1 parent 3d2a04d commit c9e81fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ class ChatEditingNotebookEditorWidgetIntegration extends Disposable implements I
139139
if (!notebookEditor) {
140140
return;
141141
}
142-
originalReadonly ??= notebookEditor.isReadOnly;
143142
if (isReadOnly) {
143+
originalReadonly ??= notebookEditor.isReadOnly;
144144
notebookEditor.setOptions({ isReadOnly: true });
145145
} else if (originalReadonly === false) {
146146
notebookEditor.setOptions({ isReadOnly: false });
@@ -160,7 +160,7 @@ class ChatEditingNotebookEditorWidgetIntegration extends Disposable implements I
160160
disposable.dispose();
161161
}, 100);
162162
const disposable = toDisposable(() => clearTimeout(timeout));
163-
this._register(disposable);
163+
r.store.add(disposable);
164164
}
165165
}));
166166

0 commit comments

Comments
 (0)