Git - Limit the enablement "* selected ranges" command palette commands (#172843)

This commit is contained in:
Ladislau Szomoru
2023-01-30 21:15:33 +01:00
committed by GitHub
parent f6382a4112
commit b309525a3b

View File

@@ -811,7 +811,7 @@
},
{
"command": "git.stageSelectedRanges",
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0"
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && resourceScheme =~ /^git$|^file$/"
},
{
"command": "git.stageChange",
@@ -819,7 +819,7 @@
},
{
"command": "git.revertSelectedRanges",
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0"
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && resourceScheme =~ /^git$|^file$/"
},
{
"command": "git.revertChange",
@@ -839,7 +839,7 @@
},
{
"command": "git.unstageSelectedRanges",
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0"
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/"
},
{
"command": "git.clean",