mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-02-16 10:58:34 -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;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
const line = editor.selection.active.line;
|
|
||||||
const gitUri = GitUri.fromUri(uri, this.git);
|
const gitUri = GitUri.fromUri(uri, this.git);
|
||||||
|
|
||||||
if (!message) {
|
if (!message) {
|
||||||
if (!sha) {
|
if (!sha) {
|
||||||
|
const line = editor.selection.active.line;
|
||||||
const blameline = line - gitUri.offset;
|
const blameline = line - gitUri.offset;
|
||||||
if (blameline < 0) return undefined;
|
if (blameline < 0) return undefined;
|
||||||
|
|
||||||
|
|||||||
@@ -28,10 +28,10 @@ export class CopyShaToClipboardCommand extends ActiveEditorCommand {
|
|||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
const line = editor.selection.active.line;
|
|
||||||
const gitUri = GitUri.fromUri(uri, this.git);
|
const gitUri = GitUri.fromUri(uri, this.git);
|
||||||
|
|
||||||
if (!sha) {
|
if (!sha) {
|
||||||
|
const line = editor.selection.active.line;
|
||||||
const blameline = line - gitUri.offset;
|
const blameline = line - gitUri.offset;
|
||||||
if (blameline < 0) return undefined;
|
if (blameline < 0) return undefined;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user