Pārlūkot izejas kodu

Uses built-in Copy As menu

main
Eric Amodio pirms 3 gadiem
vecāks
revīzija
8aac12ea79
3 mainītis faili ar 42 papildinājumiem un 36 dzēšanām
  1. +39
    -35
      package.json
  2. +2
    -0
      src/commands/openFileOnRemote.ts
  3. +1
    -1
      src/webviews/apps/settings/partials/menus.html

+ 39
- 35
package.json Parādīt failu

@ -18,7 +18,7 @@
"url": "https://github.com/eamodio/vscode-gitlens.git"
},
"engines": {
"vscode": "^1.54.0-insiders"
"vscode": "^1.55.0-insiders"
},
"main": "./dist/gitlens",
"icon": "images/gitlens-icon.png",
@ -5347,10 +5347,6 @@
"when": "!gitlens:disabled && !gitlens:readonly"
},
{
"command": "gitlens.gitCommands.show",
"when": "!gitlens:disabled && !gitlens:readonly"
},
{
"command": "gitlens.gitCommands.switch",
"when": "!gitlens:disabled && !gitlens:readonly"
},
@ -6493,11 +6489,33 @@
"submenu": "gitlens/editor/annotations",
"when": "editorTextFocus && gitlens:activeFileStatus =~ /blameable/ && config.gitlens.menus.editor.blame",
"group": "2_gitlens_1@5"
}
],
"editor/context/copy": [
{
"command": "gitlens.copyRemoteFileUrlToClipboard",
"when": "editorTextFocus && gitlens:activeFileStatus =~ /blameable/ && config.gitlens.menus.editor.clipboard",
"group": "1_gitlens@1"
},
{
"submenu": "gitlens/editor/context/copy",
"command": "gitlens.copyRemoteFileUrlFrom",
"when": "editorTextFocus && gitlens:activeFileStatus =~ /blameable/ && config.gitlens.menus.editor.clipboard",
"group": "1_gitlens@2"
},
{
"command": "gitlens.copyRemoteCommitUrl",
"when": "editorTextFocus && gitlens:activeFileStatus =~ /blameable/ && config.gitlens.menus.editor.clipboard",
"group": "9_cutcopypaste@3"
"group": "1_gitlens@3"
},
{
"command": "gitlens.copyShaToClipboard",
"when": "editorTextFocus && gitlens:activeFileStatus =~ /blameable/ && config.gitlens.menus.editor.clipboard",
"group": "2_gitlens@1"
},
{
"command": "gitlens.copyMessageToClipboard",
"when": "editorTextFocus && gitlens:activeFileStatus =~ /blameable/ && config.gitlens.menus.editor.clipboard",
"group": "2_gitlens@2"
}
],
"editor/title": [
@ -6725,6 +6743,18 @@
"group": "4_gitlens@1"
}
],
"menuBar/edit/copy": [
{
"command": "gitlens.copyRemoteFileUrlToClipboard",
"when": "gitlens:activeFileStatus =~ /blameable/ && config.gitlens.menus.editor.clipboard",
"group": "1_gitlens@1"
},
{
"command": "gitlens.copyRemoteFileUrlFrom",
"when": "gitlens:activeFileStatus =~ /blameable/ && config.gitlens.menus.editor.clipboard",
"group": "1_gitlens@2"
}
],
"scm/resourceGroup/context": [
{
"command": "gitlens.stashSave",
@ -8725,28 +8755,6 @@
"group": "2_gitlens@3"
}
],
"gitlens/editor/context/copy": [
{
"command": "gitlens.copyShaToClipboard",
"group": "1_gitlens@1"
},
{
"command": "gitlens.copyMessageToClipboard",
"group": "1_gitlens@2"
},
{
"command": "gitlens.copyRemoteCommitUrl",
"group": "2_gitlens@3"
},
{
"command": "gitlens.copyRemoteFileUrlToClipboard",
"group": "2_gitlens@4"
},
{
"command": "gitlens.copyRemoteFileUrlFrom",
"group": "2_gitlens@5"
}
],
"gitlens/editor/context/openChanges": [
{
"command": "gitlens.diffWithPrevious",
@ -8961,7 +8969,7 @@
},
{
"id": "gitlens/commit/copy",
"label": "Copy as"
"label": "Copy As"
},
{
"id": "gitlens/commit/openChanges",
@ -8969,7 +8977,7 @@
},
{
"id": "gitlens/commit/file/copy",
"label": "Copy as"
"label": "Copy As"
},
{
"id": "gitlens/commit/file/commit",
@ -8988,10 +8996,6 @@
}
},
{
"id": "gitlens/editor/context/copy",
"label": "Copy as"
},
{
"id": "gitlens/editor/context/openChanges",
"label": "Open Changes"
},

+ 2
- 0
src/commands/openFileOnRemote.ts Parādīt failu

@ -89,6 +89,8 @@ export class OpenFileOnRemoteCommand extends ActiveEditorCommand {
if (context.command === Commands.OpenFileOnRemoteFrom || context.command === Commands.CopyRemoteFileUrlFrom) {
args = { ...args, pickBranchOrTag: true, range: false };
} else if (context.command === Commands.CopyRemoteFileUrl && context.type === 'unknown') {
args = { ...args, range: false };
}
return this.execute(context.editor, uri, args);

+ 1
- 1
src/webviews/apps/settings/partials/menus.html Parādīt failu

@ -96,7 +96,7 @@
data-setting-type="object"
disabled
/>
<label for="menus.editor.clipboard">Add <i>Copy</i> submenu</label>
<label for="menus.editor.clipboard">Add to the <i>Copy As</i> submenu</label>
</div>
</div>
</div>

Notiek ielāde…
Atcelt
Saglabāt