From cd1f8db59ef5ea0781064fa27ad2bc3abc765d09 Mon Sep 17 00:00:00 2001 From: Alexandru Dima Date: Mon, 7 Oct 2024 16:20:51 +0200 Subject: [PATCH] Don't render the inline edits in diff editors (#230710) --- .../contrib/chat/browser/chatEditorController.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/chat/browser/chatEditorController.ts b/src/vs/workbench/contrib/chat/browser/chatEditorController.ts index 937938a1c71..73394e6ebb4 100644 --- a/src/vs/workbench/contrib/chat/browser/chatEditorController.ts +++ b/src/vs/workbench/contrib/chat/browser/chatEditorController.ts @@ -43,20 +43,24 @@ export class ChatEditorController extends Disposable implements IEditorContribut return; } const model = this._editor.getModel(); + if (this._editor.getOption(EditorOption.inDiffEditor)) { + this._clearRendering(); + return; + } this._sessionStore.add(model.onDidChangeContent(() => this._updateSessionDecorations())); this._updateSessionDecorations(); } private _updateSessionDecorations(): void { if (!this._editor.hasModel()) { - this._decorations.clear(); + this._clearRendering(); return; } const model = this._editor.getModel(); const editingSession = this._chatEditingService.getEditingSession(model.uri); const entry = this._getEntry(editingSession, model); if (!entry) { - this._decorations.clear(); + this._clearRendering(); return; }