mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-16 01:25:42 -05:00
Changes behaviors when file has unsaved changes:
- Status bar blame information will hide - CodeLens change to a `Cannot determine...` message and become unclickable - Many menu choices and commands will hide Fixes #36 - Blame information is invalid when a file has unsaved changes Fixed #38 - Toggle Blame Annotation button shows even when it isn't valid Preps v2.9.0
This commit is contained in:
@@ -20,10 +20,12 @@ export class DiffLineWithPreviousCommand extends ActiveEditorCommand {
|
||||
uri = editor.document.uri;
|
||||
}
|
||||
|
||||
line = line ||(editor && editor.selection.active.line) || 0;
|
||||
let gitUri = GitUri.fromUri(uri, this.git);
|
||||
const gitUri = GitUri.fromUri(uri, this.git);
|
||||
line = line || (editor && editor.selection.active.line) || gitUri.offset;
|
||||
|
||||
if (!commit || GitProvider.isUncommitted(commit.sha)) {
|
||||
if (editor && editor.document && editor.document.isDirty) return undefined;
|
||||
|
||||
const blameline = line - gitUri.offset;
|
||||
if (blameline < 0) return undefined;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user