Working on hooking up revert properly for custom editors

This commit is contained in:
Matt Bierner
2019-11-21 20:27:47 -08:00
parent f515fdcfe5
commit 9b89cca38e
5 changed files with 29 additions and 18 deletions

View File

@@ -273,8 +273,8 @@ export class MainThreadWebviews extends Disposable implements extHostProtocol.Ma
const model = await this._customEditorService.models.loadOrCreate(webviewInput.getResource(), webviewInput.viewType);
model.onUndo(edit => { this._proxy.$undoEdits(handle, [edit]); });
model.onRedo(edit => { this._proxy.$redoEdits(handle, [edit]); });
model.onUndo(edits => { this._proxy.$undoEdits(handle, edits); });
model.onRedo(edits => { this._proxy.$redoEdits(handle, edits); });
model.onWillSave(e => { e.waitUntil(this._proxy.$onSave(handle)); });
webviewInput.onDispose(() => {