提交 0d584a90 编写于 作者: M Matt Bierner

Allow open preview from markdown file title context menu

Part of #37045
上级 a4c3e747
......@@ -115,6 +115,13 @@
"group": "navigation"
}
],
"editor/title/context": [
{
"command": "markdown.showPreview",
"when": "resourceLangId == markdown",
"group": "navigation"
}
],
"commandPalette": [
{
"command": "markdown.showPreview",
......
......@@ -80,7 +80,7 @@ export class ShowPreviewCommand implements Command {
) { }
public execute(mainUri?: vscode.Uri, allUris?: vscode.Uri[], previewSettings?: PreviewSettings) {
for (const uri of (allUris || [mainUri])) {
for (const uri of Array.isArray(allUris) ? allUris : [mainUri]) {
showPreview(this.webviewManager, this.telemetryReporter, uri, {
sideBySide: false,
locked: previewSettings && previewSettings.locked
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册