Skip to content

Commit ef692b2

Browse files
committed
Some feedback to the user...
1 parent 601a852 commit ef692b2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/extension.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ export function activate(context: vscode.ExtensionContext) {
5656

5757
context.subscriptions.push(
5858
vscode.commands.registerCommand("extension.gitextensions.blame", () => {
59+
if (window.activeTextEditor === undefined) {
60+
vscode.window.showWarningMessage('No file selected.')
61+
return;
62+
}
5963
const path = window.activeTextEditor.document.uri.fsPath;
6064
launchGitExtensions("blame", path);
6165
})
@@ -94,6 +98,7 @@ export function activate(context: vscode.ExtensionContext) {
9498
context.subscriptions.push(
9599
vscode.commands.registerCommand("extension.gitextensions.difftool", () => {
96100
if (window.activeTextEditor === undefined) {
101+
vscode.window.showWarningMessage('No file selected.')
97102
return;
98103
}
99104
const filePath = window.activeTextEditor.document.uri.fsPath;
@@ -104,6 +109,7 @@ export function activate(context: vscode.ExtensionContext) {
104109
context.subscriptions.push(
105110
vscode.commands.registerCommand("extension.gitextensions.filehistory", () => {
106111
if (window.activeTextEditor === undefined) {
112+
vscode.window.showWarningMessage('No file selected.')
107113
return;
108114
}
109115
const filePath = window.activeTextEditor.document.uri.fsPath;

0 commit comments

Comments
 (0)