From a4aae00a0a9b50ced9fa6388a1be2695b91a904b Mon Sep 17 00:00:00 2001 From: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com> Date: Mon, 10 Jan 2022 15:32:17 +0100 Subject: [PATCH] Use scmActiveResourceHasChanges in the when clause to show/hide command in the editor title --- extensions/git/package.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/extensions/git/package.json b/extensions/git/package.json index 8ecbeffe76a..376f59e9e8f 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -84,8 +84,7 @@ "command": "git.openChange", "title": "%command.openChange%", "category": "Git", - "icon": "$(compare-changes)", - "enablement": "scmActiveResourceHasChanges" + "icon": "$(compare-changes)" }, { "command": "git.openAllChanges", @@ -1370,7 +1369,7 @@ { "command": "git.openChange", "group": "navigation", - "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && !isInDiffEditor && resourceScheme == file" + "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && !isInDiffEditor && resourceScheme == file && scmActiveResourceHasChanges" }, { "command": "git.stageSelectedRanges",