Quellcode durchsuchen

Fixes issue with copy to clipboard with no active editor

main
Eric Amodio vor 7 Jahren
Ursprung
Commit
f837de7430
2 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. +1
    -1
      src/commands/copyMessageToClipboard.ts
  2. +1
    -1
      src/commands/copyShaToClipboard.ts

+ 1
- 1
src/commands/copyMessageToClipboard.ts Datei anzeigen

@ -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 Datei anzeigen

@ -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…
Abbrechen
Speichern