Skip to content

Commit 801f963

Browse files
authored
prevent double discard of inline chat edits (microsoft#205945)
maybe microsoft#204592
1 parent eb278bd commit 801f963

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,9 @@ export class HunkData {
723723
discardAll() {
724724
const edits: ISingleEditOperation[][] = [];
725725
for (const item of this.getInfo()) {
726-
edits.push(this._discardEdits(item));
726+
if (item.getState() !== HunkState.Rejected) {
727+
edits.push(this._discardEdits(item));
728+
}
727729
}
728730
const undoEdits: IValidEditOperation[][] = [];
729731
this._textModelN.pushEditOperations(null, edits.flat(), (_undoEdits) => {

0 commit comments

Comments
 (0)