From 12ada73bf9d408f5b95efcd12333626889e771eb Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 27 Oct 2022 14:52:05 -0700 Subject: [PATCH] Disable markdown insert link commands in readonly editors (#164820) Disable insert link commands in readonly editors --- extensions/markdown-language-features/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/markdown-language-features/package.json b/extensions/markdown-language-features/package.json index fbcc7885befb2..960939ed7b9d4 100644 --- a/extensions/markdown-language-features/package.json +++ b/extensions/markdown-language-features/package.json @@ -182,13 +182,13 @@ "command": "markdown.editor.insertLinkFromWorkspace", "title": "%markdown.editor.insertLinkFromWorkspace%", "category": "Markdown", - "enablement": "editorLangId == markdown" + "enablement": "editorLangId == markdown && !activeEditorIsReadonly" }, { "command": "markdown.editor.insertImageFromWorkspace", "title": "%markdown.editor.insertImageFromWorkspace%", "category": "Markdown", - "enablement": "editorLangId == markdown" + "enablement": "editorLangId == markdown && !activeEditorIsReadonly" } ], "menus": {