mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 11:08:51 +01:00
Make sure we handle webview position updates when an entire editor group moves
This commit is contained in:
@@ -355,7 +355,7 @@ export type WebviewPanelHandle = string;
|
||||
export interface MainThreadWebviewsShape extends IDisposable {
|
||||
$createWebviewPanel(handle: WebviewPanelHandle, viewType: string, title: string, column: EditorPosition, options: vscode.WebviewPanelOptions & vscode.WebviewOptions, extensionFolderPath: string): void;
|
||||
$disposeWebview(handle: WebviewPanelHandle): void;
|
||||
$reveal(handle: WebviewPanelHandle, column: EditorPosition): void;
|
||||
$reveal(handle: WebviewPanelHandle, column: EditorPosition | undefined): void;
|
||||
$setTitle(handle: WebviewPanelHandle, value: string): void;
|
||||
$setHtml(handle: WebviewPanelHandle, value: string): void;
|
||||
$postMessage(handle: WebviewPanelHandle, value: any): Thenable<boolean>;
|
||||
|
||||
@@ -58,11 +58,6 @@ export class ExtHostWebview implements vscode.Webview {
|
||||
return this._proxy.$postMessage(this._handle, message);
|
||||
}
|
||||
|
||||
public reveal(viewColumn: vscode.ViewColumn): void {
|
||||
this.assertNotDisposed();
|
||||
this._proxy.$reveal(this._handle, typeConverters.fromViewColumn(viewColumn));
|
||||
}
|
||||
|
||||
private assertNotDisposed() {
|
||||
if (this._isDisposed) {
|
||||
throw new Error('Webview is disposed');
|
||||
@@ -176,9 +171,9 @@ export class ExtHostWebviewPanel implements vscode.WebviewPanel {
|
||||
return this._proxy.$postMessage(this._handle, message);
|
||||
}
|
||||
|
||||
public reveal(viewColumn: vscode.ViewColumn): void {
|
||||
public reveal(viewColumn?: vscode.ViewColumn): void {
|
||||
this.assertNotDisposed();
|
||||
this._proxy.$reveal(this._handle, typeConverters.fromViewColumn(viewColumn));
|
||||
this._proxy.$reveal(this._handle, viewColumn ? typeConverters.fromViewColumn(viewColumn) : undefined);
|
||||
}
|
||||
|
||||
private assertNotDisposed() {
|
||||
|
||||
Reference in New Issue
Block a user