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:
Eric Amodio
2016-09-05 16:40:38 -04:00
parent d04696ac1d
commit b7920f3c3d
12 changed files with 179 additions and 236 deletions

View File

@@ -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);
}