mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-28 01:25:48 -05:00
Fixes (read: hacks) blame with visible whitespace
Adds diff menu commands always Attempts to move the diff file to the correct line number Fixes code action provider -- works again Deletes deprecated code
This commit is contained in:
@@ -92,14 +92,12 @@ export default class GitBlameContentProvider implements TextDocumentContentProvi
|
||||
this.git.getBlameForShaRange(data.fileName, data.sha, data.range).then(blame => {
|
||||
if (!blame.lines.length) return;
|
||||
|
||||
this.git.getCommitMessage(data.sha).then(msg => {
|
||||
editor.setDecorations(this._blameDecoration, blame.lines.map(l => {
|
||||
return {
|
||||
range: editor.document.validateRange(new Range(l.originalLine, 0, l.originalLine, 1000000)),
|
||||
hoverMessage: `${msg}\n${blame.commit.author}\n${moment(blame.commit.date).format('MMMM Do, YYYY hh:MM a')}\n${l.sha}`
|
||||
};
|
||||
}));
|
||||
})
|
||||
editor.setDecorations(this._blameDecoration, blame.lines.map(l => {
|
||||
return {
|
||||
range: editor.document.validateRange(new Range(l.originalLine, 0, l.originalLine, 1000000)),
|
||||
hoverMessage: `${blame.commit.message}\n${blame.commit.author}\n${moment(blame.commit.date).format('MMMM Do, YYYY hh:MM a')}\n${l.sha}`
|
||||
};
|
||||
}));
|
||||
});
|
||||
}, 200);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user