mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-03 06:51:53 +01:00
Sync custom editor edits
If multiple instances of the same custom editor are opened for the same resource, the edit stack should be shared between them. This matches how we work with text files
This commit is contained in:
@@ -289,7 +289,7 @@ export class MainThreadWebviews extends Disposable implements extHostProtocol.Ma
|
||||
|
||||
try {
|
||||
await this._proxy.$resolveWebviewEditor(
|
||||
webviewInput.getResource(),
|
||||
{ resource: webviewInput.getResource(), edits: model.currentEdits },
|
||||
handle,
|
||||
viewType,
|
||||
webviewInput.getTitle(),
|
||||
@@ -299,6 +299,7 @@ export class MainThreadWebviews extends Disposable implements extHostProtocol.Ma
|
||||
} catch (error) {
|
||||
onUnexpectedError(error);
|
||||
webviewInput.webview.html = MainThreadWebviews.getDeserializationFailedContents(viewType);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user