From 590d36f948b24c4b18e37e6af337fb568409d0de Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 18 Dec 2017 16:04:14 +0100 Subject: [PATCH] fixes #40439 --- extensions/git/package.json | 19 ++++++++++++++++--- .../resources/icons/dark/open-file-mono.svg | 1 + .../resources/icons/light/open-file-mono.svg | 1 + .../git/resources/icons/light/open-file.svg | 4 +--- extensions/git/src/commands.ts | 5 +++++ 5 files changed, 24 insertions(+), 6 deletions(-) create mode 100644 extensions/git/resources/icons/dark/open-file-mono.svg create mode 100644 extensions/git/resources/icons/light/open-file-mono.svg diff --git a/extensions/git/package.json b/extensions/git/package.json index 6ffdfb33a49..645361ff5ec 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -68,6 +68,15 @@ "dark": "resources/icons/dark/open-file.svg" } }, + { + "command": "git.openFile2", + "title": "%command.openFile%", + "category": "Git", + "icon": { + "light": "resources/icons/light/open-file-mono.svg", + "dark": "resources/icons/dark/open-file-mono.svg" + } + }, { "command": "git.openHEADFile", "title": "%command.openHEADFile%", @@ -369,6 +378,10 @@ "command": "git.revertChange", "when": "false" }, + { + "command": "git.openFile2", + "when": "false" + }, { "command": "git.unstage", "when": "gitOpenRepositoryCount != 0" @@ -712,7 +725,7 @@ "group": "inline" }, { - "command": "git.openFile", + "command": "git.openFile2", "when": "scmProvider == git && scmResourceGroup == merge", "group": "inline0" }, @@ -742,7 +755,7 @@ "group": "inline" }, { - "command": "git.openFile", + "command": "git.openFile2", "when": "scmProvider == git && scmResourceGroup == index", "group": "inline0" }, @@ -782,7 +795,7 @@ "group": "inline" }, { - "command": "git.openFile", + "command": "git.openFile2", "when": "scmProvider == git && scmResourceGroup == workingTree", "group": "inline0" }, diff --git a/extensions/git/resources/icons/dark/open-file-mono.svg b/extensions/git/resources/icons/dark/open-file-mono.svg new file mode 100644 index 00000000000..830727e70b3 --- /dev/null +++ b/extensions/git/resources/icons/dark/open-file-mono.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/extensions/git/resources/icons/light/open-file-mono.svg b/extensions/git/resources/icons/light/open-file-mono.svg new file mode 100644 index 00000000000..fa3f245b755 --- /dev/null +++ b/extensions/git/resources/icons/light/open-file-mono.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/extensions/git/resources/icons/light/open-file.svg b/extensions/git/resources/icons/light/open-file.svg index 85a001dccc2..d23a23c6b5f 100644 --- a/extensions/git/resources/icons/light/open-file.svg +++ b/extensions/git/resources/icons/light/open-file.svg @@ -1,3 +1 @@ - -]> \ No newline at end of file + \ No newline at end of file diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 9b20e9487bb..d165c520e12 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -533,6 +533,11 @@ export class CommandCenter { } } + @command('git.openFile2') + async openFile2(arg?: Resource | Uri, ...resourceStates: SourceControlResourceState[]): Promise { + this.openFile(arg, ...resourceStates); + } + @command('git.openHEADFile') async openHEADFile(arg?: Resource | Uri): Promise { let resource: Resource | undefined = undefined;