Trying to hook up basic save for custom editors

This commit is contained in:
Matt Bierner
2019-11-18 11:18:12 -08:00
parent 942287eb44
commit 8bbe3157f0
8 changed files with 42 additions and 16 deletions

View File

@@ -273,13 +273,9 @@ 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(edit => { this._proxy.$undoEdits(handle, [edit]); });
model.onRedo(edit => { this._proxy.$redoEdits(handle, [edit]); });
model.onWillSave(e => { e.waitUntil(this._proxy.$onSave(handle)); });
webviewInput.onDispose(() => {
this._customEditorService.models.disposeModel(model);