ソースを参照

Adds alt command to compare with previous toolbar command

main
Eric Amodio 6年前
コミット
5da25f1698
5個のファイルの変更27行の追加2行の削除
  1. +1
    -0
      CHANGELOG.md
  2. +8
    -0
      images/dark/icon-prev-commit-menu.svg
  3. +8
    -0
      images/light/icon-prev-commit-menu.svg
  4. +7
    -1
      package.json
  5. +3
    -1
      src/commands/diffWithRevision.ts

+ 1
- 0
CHANGELOG.md ファイルの表示

@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Adds `gitlens.hovers.avatars` setting to specify whether to show avatar images in hovers — closes [#432](https://github.com/eamodio/vscode-gitlens/issues/432) thanks to [PR #441](https://github.com/eamodio/vscode-gitlens/pull/441) by Segev Finer ([@segevfiner](https://github.com/segevfiner))
- Adds `gitlens.hovers.avatars` setting to the interactive settings editor to specify whether to show avatar images in hovers
- Adds *Choose from Branch or Tag History...* to the quick pick menu shown by the *Show File History...* command (`gitlens.showQuickFileHistory`) — closes [#316](https://github.com/eamodio/vscode-gitlens/issues/316)
- Adds the *Compare File with Revision...* command (`gitlens.diffWithRevision`) as an alternate (`alt+click`) for the *Compare File with Previous Revision* command in the editor toolbar
### Changed
- Renames the *GitLens History* explorer to *GitLens File History* explorer for better clarity

+ 8
- 0
images/dark/icon-prev-commit-menu.svg ファイルの表示

@ -0,0 +1,8 @@
<svg width="16" height="22" xmlns="http://www.w3.org/2000/svg">
<path fill="#C5C5C5" d="M14.34 10a4 4 0 0 0-3.86-3 4 4 0 0 0-3.86 3H3.48v2h3.14a4 4 0 0 0 3.86 3 4 4 0 0 0 3.86-3h1.38v-2h-1.38zm-3.86 3.2a2.2 2.2 0 0 1-2.2-2.2c0-1.22.98-2.2 2.2-2.2 1.22 0 2.2.98 2.2 2.2a2.2 2.2 0 0 1-2.2 2.2zM5.98 10h-1.7l3-3h-3l-4 4 4 4h3l-3-3H6l-.02-2z"/>
<g fill="#C5C5C5">
<ellipse ry="1.344" rx="1.344" cy="18.062" cx="3.438"/>
<ellipse ry="1.344" rx="1.344" cy="18.062" cx="8"/>
<ellipse ry="1.344" rx="1.344" cy="18.062" cx="12.562"/>
</g>
</svg>

+ 8
- 0
images/light/icon-prev-commit-menu.svg ファイルの表示

@ -0,0 +1,8 @@
<svg width="16" height="22" xmlns="http://www.w3.org/2000/svg">
<path fill="#424242" d="M14.34 10a4 4 0 0 0-3.86-3 4 4 0 0 0-3.86 3H3.48v2h3.14a4 4 0 0 0 3.86 3 4 4 0 0 0 3.86-3h1.38v-2h-1.38zm-3.86 3.2a2.2 2.2 0 0 1-2.2-2.2c0-1.22.98-2.2 2.2-2.2 1.22 0 2.2.98 2.2 2.2a2.2 2.2 0 0 1-2.2 2.2zM5.98 10h-1.7l3-3h-3l-4 4 4 4h3l-3-3H6l-.02-2z"/>
<g fill="#424242">
<ellipse ry="1.344" rx="1.344" cy="18.062" cx="3.438"/>
<ellipse ry="1.344" rx="1.344" cy="18.062" cx="8"/>
<ellipse ry="1.344" rx="1.344" cy="18.062" cx="12.562"/>
</g>
</svg>

+ 7
- 1
package.json ファイルの表示

@ -1439,7 +1439,11 @@
{
"command": "gitlens.diffWithRevision",
"title": "Compare File with Revision...",
"category": "GitLens"
"category": "GitLens",
"icon": {
"dark": "images/dark/icon-prev-commit-menu.svg",
"light": "images/light/icon-prev-commit-menu.svg"
}
},
{
"command": "gitlens.diffWithWorking",
@ -2535,11 +2539,13 @@
"editor/title": [
{
"command": "gitlens.diffWithPrevious",
"alt": "gitlens.diffWithRevision",
"when": "!isInDiffEditor && gitlens:activeFileStatus =~ /tracked/ && config.gitlens.menus.editorGroup.compare",
"group": "navigation@97"
},
{
"command": "gitlens.diffWithPreviousInDiff",
"alt": "gitlens.diffWithRevision",
"when": "isInDiffEditor && gitlens:activeFileStatus =~ /tracked/ && config.gitlens.menus.editorGroup.compare",
"group": "navigation@97"
},

+ 3
- 1
src/commands/diffWithRevision.ts ファイルの表示

@ -37,7 +37,9 @@ export class DiffWithRevisionCommand extends ActiveEditorCommand {
const placeHolder = `Compare ${gitUri.getFormattedPath(
args.branchOrTag ? ` (${args.branchOrTag.name})${Strings.pad(GlyphChars.Dot, 2, 2)}` : undefined
)}${gitUri.sha ? ` ${Strings.pad(GlyphChars.Dot, 1, 1)} ${gitUri.shortSha}` : ''} with${GlyphChars.Ellipsis}`;
)}${gitUri.sha ? ` ${Strings.pad(GlyphChars.Dot, 1, 1)} ${gitUri.shortSha}` : ''} with revision${
GlyphChars.Ellipsis
}`;
const progressCancellation = FileHistoryQuickPick.showProgress(placeHolder);
try {

読み込み中…
キャンセル
保存