🐛 split git open file/changes into two sets of commands

fixes #23729
This commit is contained in:
Joao Moreno
2017-03-31 11:08:46 +02:00
parent 8ef40c6b23
commit 8d01db6d53
2 changed files with 56 additions and 8 deletions

View File

@@ -63,6 +63,24 @@
"dark": "resources/icons/dark/open-file.svg"
}
},
{
"command": "git.openChangeFromUri",
"title": "%command.openChange%",
"category": "Git",
"icon": {
"light": "resources/icons/light/open-change.svg",
"dark": "resources/icons/dark/open-change.svg"
}
},
{
"command": "git.openFileFromUri",
"title": "%command.openFile%",
"category": "Git",
"icon": {
"light": "resources/icons/light/open-file.svg",
"dark": "resources/icons/dark/open-file.svg"
}
},
{
"command": "git.stage",
"title": "%command.stage%",
@@ -228,10 +246,18 @@
},
{
"command": "git.openChange",
"when": "config.git.enabled && scmProvider == git && gitState == idle"
"when": "false"
},
{
"command": "git.openFile",
"when": "false"
},
{
"command": "git.openChangeFromUri",
"when": "config.git.enabled && scmProvider == git && gitState == idle"
},
{
"command": "git.openFileFromUri",
"when": "config.git.enabled && scmProvider == git && gitState == idle"
},
{
@@ -524,12 +550,12 @@
],
"editor/title": [
{
"command": "git.openFile",
"command": "git.openFileFromUri",
"group": "navigation",
"when": "config.git.enabled && scmProvider == git && isInDiffEditor && resourceScheme != extension"
},
{
"command": "git.openChange",
"command": "git.openChangeFromUri",
"group": "navigation",
"when": "config.git.enabled && scmProvider == git && !isInDiffEditor && resourceScheme != extension"
}