提交 3714004c 编写于 作者: M Matt Bierner

Fix appliedEdits dropping some edits

上级 12f2e2af
......@@ -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;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册