Skip to content

Commit af8b6ad

Browse files
authored
SCM - Introduce another open changes command got editor/command palette (microsoft#138293)
* Introduce another command got editor/command palette
1 parent d29de45 commit af8b6ad

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

extensions/git/package.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@
8484
"command": "git.openChange",
8585
"title": "%command.openChange%",
8686
"category": "Git",
87+
"icon": "$(compare-changes)"
88+
},
89+
{
90+
"command": "git.openChangeEditor",
91+
"title": "%command.openChange%",
92+
"category": "Git",
8793
"icon": "$(compare-changes)",
8894
"enablement": "scmActiveResourceHasChanges"
8995
},
@@ -602,6 +608,10 @@
602608
},
603609
{
604610
"command": "git.openChange",
611+
"when": "false"
612+
},
613+
{
614+
"command": "git.openChangeEditor",
605615
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0"
606616
},
607617
{
@@ -1359,7 +1369,7 @@
13591369
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && isInNotebookTextDiffEditor && resourceScheme =~ /^git$|^file$/"
13601370
},
13611371
{
1362-
"command": "git.openChange",
1372+
"command": "git.openChangeEditor",
13631373
"group": "navigation",
13641374
"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0 && !isInDiffEditor && resourceScheme == file"
13651375
},

extensions/git/src/commands.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,7 @@ export class CommandCenter {
764764
}
765765

766766
@command('git.openChange')
767+
@command('git.openChangeEditor')
767768
async openChange(arg?: Resource | Uri, ...resourceStates: SourceControlResourceState[]): Promise<void> {
768769
let resources: Resource[] | undefined = undefined;
769770

0 commit comments

Comments
 (0)