mirror of
https://github.com/microsoft/vscode.git
synced 2026-08-09 15:24:28 +01:00
Handle dirty state
This commit is contained in:
@@ -152,6 +152,11 @@ export class CustomEditorInput extends LazilyResolvedWebviewEditorInput {
|
||||
|
||||
if (this.resource.scheme === Schemas.untitled) {
|
||||
capabilities |= EditorInputCapabilities.Untitled;
|
||||
capabilities |= EditorInputCapabilities.AuxWindowUnsupported;
|
||||
}
|
||||
|
||||
if (this.isDirty()) {
|
||||
capabilities |= EditorInputCapabilities.AuxWindowUnsupported;
|
||||
}
|
||||
|
||||
return capabilities;
|
||||
|
||||
@@ -123,6 +123,9 @@ export class OverlayWebview extends Disposable implements IOverlayWebview {
|
||||
if (this._windowId !== targetWindow.vscodeWindowId) {
|
||||
// moving to a new window
|
||||
this.release(oldOwner);
|
||||
// since we are moving to a new window, we need to dispose the webview and recreate
|
||||
this._webview.clear();
|
||||
this._webviewEvents.clear();
|
||||
this._container?.domNode.remove();
|
||||
this._container = undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user