Skip to content

Commit

Permalink
Fix appliedEdits dropping some edits
Browse files Browse the repository at this point in the history
  • Loading branch information
mjbvz committed Mar 31, 2020
1 parent 12f2e2a commit 3714004
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/vs/workbench/api/common/extHostTypes.ts
Expand Up @@ -2815,11 +2815,11 @@ export class CustomDocument<EditType = unknown> implements vscode.CustomDocument

/** @internal*/ _addEdit(edit: EditType): number {
const id = this.#edits.add([edit]);
this.#editState = {
allEdits: [...this.#editState.allEdits.slice(0, this.#editState.currentIndex), id],
this._updateEditState({
allEdits: [...this.#editState.allEdits.slice(0, this.#editState.currentIndex + 1), id],
currentIndex: this.#editState.currentIndex + 1,
saveIndex: this.#editState.saveIndex,
};
});
return id;
}
}
Expand Down

0 comments on commit 3714004

Please sign in to comment.