Ver a proveniência

Fixes issue with copy to clipboard with no active editor

main
Eric Amodio há 7 anos
ascendente
cometimento
f837de7430
2 ficheiros alterados com 2 adições e 2 eliminações
  1. +1
    -1
      src/commands/copyMessageToClipboard.ts
  2. +1
    -1
      src/commands/copyShaToClipboard.ts

+ 1
- 1
src/commands/copyMessageToClipboard.ts Ver ficheiro

@ -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 Ver ficheiro

@ -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;

Carregando…
Cancelar
Guardar