Removes unnecessary subscriptions on invalid blame

Removes duplicate lint rule
Switches on-demand CodeLens to be a global toggle
This commit is contained in:
Eric Amodio
2016-11-12 16:30:07 -05:00
parent e31a1a3473
commit e9db04f0c7
8 changed files with 56 additions and 60 deletions

View File

@@ -127,9 +127,7 @@ export default class GitCodeLensProvider implements CodeLensProvider {
const line = document.lineAt(symbol.location.range.start);
// Make sure there is only 1 lense per line
if (lenses.length && lenses[lenses.length - 1].range.start.line === line.lineNumber) {
return;
}
if (lenses.length && lenses[lenses.length - 1].range.start.line === line.lineNumber) return;
let startChar = -1;
try {
@@ -138,7 +136,8 @@ export default class GitCodeLensProvider implements CodeLensProvider {
catch (ex) { }
if (startChar === -1) {
startChar = line.firstNonWhitespaceCharacterIndex;
} else {
}
else {
startChar += Math.floor(symbol.name.length / 2);
}