Bladeren bron

Fixes issue with copy to clipboard with no active editor

main
Eric Amodio 7 jaren geleden
bovenliggende
commit
f837de7430
2 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. +1
    -1
      src/commands/copyMessageToClipboard.ts
  2. +1
    -1
      src/commands/copyShaToClipboard.ts

+ 1
- 1
src/commands/copyMessageToClipboard.ts Bestand weergeven

@ -28,11 +28,11 @@ export class CopyMessageToClipboardCommand extends ActiveEditorCommand {
return undefined;
}
const line = editor.selection.active.line;
const gitUri = GitUri.fromUri(uri, this.git);
if (!message) {
if (!sha) {
const line = editor.selection.active.line;
const blameline = line - gitUri.offset;
if (blameline < 0) return undefined;

+ 1
- 1
src/commands/copyShaToClipboard.ts Bestand weergeven

@ -28,10 +28,10 @@ export class CopyShaToClipboardCommand extends ActiveEditorCommand {
return undefined;
}
const line = editor.selection.active.line;
const gitUri = GitUri.fromUri(uri, this.git);
if (!sha) {
const line = editor.selection.active.line;
const blameline = line - gitUri.offset;
if (blameline < 0) return undefined;

Laden…
Annuleren
Opslaan