Make sure we handle webview position updates when an entire editor group moves

This commit is contained in:
Matt Bierner
2018-04-19 15:50:54 -07:00
parent be4e48fbe7
commit d770ce503a
7 changed files with 25 additions and 17 deletions

View File

@@ -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>;

View File

@@ -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() {