提交 85d3ccfb 编写于 作者: M Matt Bierner

Fix custom editor redo

上级 750f2876
......@@ -457,12 +457,12 @@ export class ExtHostWebviews implements ExtHostWebviewsShape {
}
}
$undoEdits(handle: WebviewPanelHandle, edits: string[]): void {
$undoEdits(handle: WebviewPanelHandle, edits: readonly any[]): void {
const panel = this.getWebviewPanel(handle);
panel?._undoEdits(edits);
}
$applyEdits(handle: WebviewPanelHandle, edits: string[]): void {
$applyEdits(handle: WebviewPanelHandle, edits: readonly any[]): void {
const panel = this.getWebviewPanel(handle);
panel?._redoEdits(edits);
}
......
......@@ -14,7 +14,7 @@ export class CustomEditorModel extends Disposable implements ICustomEditorModel
private _currentEditIndex: number = -1;
private _savePoint: number = -1;
private _edits: Array<CustomEditorEdit> = [];
private _edits: Array<any> = [];
constructor(
private readonly _resource: URI,
......@@ -136,7 +136,7 @@ export class CustomEditorModel extends Disposable implements ICustomEditorModel
const undoneEdit = this._edits[this._currentEditIndex];
--this._currentEditIndex;
this._onUndo.fire([undoneEdit]);
this._onUndo.fire([{ data: undoneEdit }]);
this.updateDirty();
}
......@@ -149,7 +149,8 @@ export class CustomEditorModel extends Disposable implements ICustomEditorModel
++this._currentEditIndex;
const redoneEdit = this._edits[this._currentEditIndex];
this._onApplyEdit.fire([redoneEdit]);
this._onApplyEdit.fire([{ data: redoneEdit }]);
this.updateDirty();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册