mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-18 01:35:36 -05:00
Fixes issue with copy to clipboard with no active editor
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user