From ae8428c3161013b8d2124205c9887d9959bc41ba Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Fri, 23 Mar 2018 02:54:25 -0400 Subject: [PATCH] Removes open working file when unneeded --- CHANGELOG.md | 3 +++ images/dark/icon-open-working-file.svg | 2 +- images/light/icon-open-working-file.svg | 2 +- package.json | 7 ++++++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84a60a1..4ac721e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Adds an indicator to the *GitLens* explorer branch history to mark the synchronization point between the local and remote branch (if available) - Adds `${agoOrDate}` and `${authorAgoOrDate}` tokens to `gitlens.blame.format`, `gitlens.currentLine.format`, `gitlens.explorers.commitFormat`, `gitlens.explorers.stashFormat`, and `gitlens.statusBar.format` settings which will honor the `gitlens.defaultDateStyle` setting — closes [#312](https://github.com/eamodio/vscode-gitlens/issues/312) +### Removed +- Removes the *Open Working File* command from the editor toolbar when the built-in *Open File* command is visible + ### Fixed - Fixes [#314](https://github.com/eamodio/vscode-gitlens/issues/314) - Toggle line annotation doesn't work properly - Fixes [#310](https://github.com/eamodio/vscode-gitlens/issues/310) - "via Terminal" commands need quoting around work directory diff --git a/images/dark/icon-open-working-file.svg b/images/dark/icon-open-working-file.svg index d431e90..a9edc17 100644 --- a/images/dark/icon-open-working-file.svg +++ b/images/dark/icon-open-working-file.svg @@ -1,4 +1,4 @@ ' - + \ No newline at end of file diff --git a/images/light/icon-open-working-file.svg b/images/light/icon-open-working-file.svg index 8217810..2ee9b26 100644 --- a/images/light/icon-open-working-file.svg +++ b/images/light/icon-open-working-file.svg @@ -1,4 +1,4 @@ ' - + \ No newline at end of file diff --git a/package.json b/package.json index 8933bc2..59ef82d 100644 --- a/package.json +++ b/package.json @@ -2153,7 +2153,12 @@ "editor/title": [ { "command": "gitlens.openWorkingFile", - "when": "gitlens:activeIsRevision", + "when": "gitlens:activeIsRevision && resourceScheme != git", + "group": "navigation@1" + }, + { + "command": "gitlens.openWorkingFile", + "when": "gitlens:activeIsRevision && resourceScheme == git && !isInDiffEditor", "group": "navigation@1" }, {