Ver código fonte

Fixes issue with copy to clipboard with no active editor

main
Eric Amodio 7 anos atrás
pai
commit
f837de7430
2 arquivos alterados com 2 adições e 2 exclusões
  1. +1
    -1
      src/commands/copyMessageToClipboard.ts
  2. +1
    -1
      src/commands/copyShaToClipboard.ts

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

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

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