Enable webview commands for webview views

Fixes #105670

Previously our webview commands assumed that webviews were always going to be in an editor. This is no longer true with webview views.

To fix this, I've added an `activeWebview` to the `IWebviewService`. This  tracks the currently focused webview.
This commit is contained in:
Matt Bierner
2020-09-09 14:44:37 -07:00
parent 6cf52e3828
commit 80b1a775d6
10 changed files with 66 additions and 59 deletions

View File

@@ -153,7 +153,7 @@ export class MainThreadCustomEditors extends Disposable implements extHostProtoc
return;
}
webviewInput.webview.onDispose(() => {
webviewInput.webview.onDidDispose(() => {
// If the model is still dirty, make sure we have time to save it
if (modelRef.object.isDirty()) {
const sub = modelRef.object.onDidChangeDirty(() => {