From 6fa270070d87361f903214b131239bc2d499a4bb Mon Sep 17 00:00:00 2001 From: Johannes Date: Wed, 18 Oct 2023 12:24:02 +0200 Subject: [PATCH] fix final edit --- .../contrib/inlineChat/browser/inlineChatController.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.ts b/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.ts index 5ca18ef7a676c..1ec6178f510de 100644 --- a/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.ts +++ b/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.ts @@ -591,8 +591,7 @@ export class InlineChatController implements IEditorContribution { response = new MarkdownResponse(this._activeSession.textModelN.uri, reply); } else if (reply) { const editResponse = new EditResponse(this._activeSession.textModelN.uri, this._activeSession.textModelN.getAlternativeVersionId(), reply, progressEdits); - const offset = editResponse.allLocalEdits.length - progressEdits.length; - for (let i = offset; i < editResponse.allLocalEdits.length; i++) { + for (let i = progressEdits.length; i < editResponse.allLocalEdits.length; i++) { await this._makeChanges(editResponse.allLocalEdits[i], true); } response = editResponse;