Add activeWebviewPanelId context key (#156944)

Fixes #156942

This context tracks the id of the active webviewPanel
This commit is contained in:
Matt Bierner
2022-08-02 22:03:33 -07:00
committed by GitHub
parent 7833aade5a
commit 784de60319
12 changed files with 51 additions and 33 deletions

View File

@@ -187,22 +187,22 @@
},
{
"command": "markdown.showSource",
"when": "markdownPreviewFocus",
"when": "activeWebviewPanelId == 'markdown.preview' || activeCustomEditorId == 'vscode.markdown.preview.editor'",
"group": "navigation"
},
{
"command": "markdown.preview.refresh",
"when": "markdownPreviewFocus",
"when": "activeWebviewPanelId == 'markdown.preview' || activeCustomEditorId == 'vscode.markdown.preview.editor'",
"group": "1_markdown"
},
{
"command": "markdown.preview.toggleLock",
"when": "markdownPreviewFocus",
"when": "activeWebviewPanelId == 'markdown.preview' || activeCustomEditorId == 'vscode.markdown.preview.editor'",
"group": "1_markdown"
},
{
"command": "markdown.showPreviewSecuritySelector",
"when": "markdownPreviewFocus",
"when": "activeWebviewPanelId == 'markdown.preview' || activeCustomEditorId == 'vscode.markdown.preview.editor'",
"group": "1_markdown"
}
],
@@ -247,7 +247,7 @@
},
{
"command": "markdown.showSource",
"when": "markdownPreviewFocus",
"when": "activeWebviewPanelId == 'markdown.preview' || activeCustomEditorId == 'vscode.markdown.preview.editor'",
"group": "navigation"
},
{
@@ -256,11 +256,11 @@
},
{
"command": "markdown.showPreviewSecuritySelector",
"when": "markdownPreviewFocus"
"when": "activeWebviewPanelId == 'markdown.preview' || activeCustomEditorId == 'vscode.markdown.preview.editor'"
},
{
"command": "markdown.preview.toggleLock",
"when": "markdownPreviewFocus"
"when": "activeWebviewPanelId == 'markdown.preview' || activeCustomEditorId == 'vscode.markdown.preview.editor'"
},
{
"command": "markdown.preview.refresh",
@@ -268,7 +268,7 @@
},
{
"command": "markdown.preview.refresh",
"when": "markdownPreviewFocus"
"when": "activeWebviewPanelId == 'markdown.preview' || activeCustomEditorId == 'vscode.markdown.preview.editor'"
},
{
"command": "markdown.findAllFileReferences",