Use scmActiveResourceHasChanges in the when clause to show/hide command in the editor title

This commit is contained in:
Ladislau Szomoru
2022-01-10 15:32:17 +01:00
parent ff75a30d9f
commit a4aae00a0a

View File

@@ -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",