mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-22 17:26:10 -05:00
Adds error messages for failed operations
Adds showHistory command support to CodeLens Fixes and improve the showHistory explorer Refactoring
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
'use strict';
|
||||
import { TextEditor, TextEditorEdit, Uri } from 'vscode';
|
||||
import { TextEditor, TextEditorEdit, Uri, window } from 'vscode';
|
||||
import BlameAnnotationController from '../blameAnnotationController';
|
||||
import { EditorCommand } from './commands';
|
||||
import { Commands } from '../constants';
|
||||
@@ -23,10 +23,11 @@ export default class ToggleBlameCommand extends EditorCommand {
|
||||
|
||||
try {
|
||||
const blame = await this.git.getBlameForLine(uri.fsPath, editor.selection.active.line);
|
||||
this.annotationController.toggleBlameAnnotation(editor, blame && blame.commit.sha);
|
||||
return this.annotationController.toggleBlameAnnotation(editor, blame && blame.commit.sha);
|
||||
}
|
||||
catch (ex) {
|
||||
Logger.error('[GitLens.ToggleBlameCommand]', `getBlameForLine(${editor.selection.active.line})`, ex);
|
||||
return window.showErrorMessage(`Unable to show blame annotations. See output channel for more details`);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user