From 95e0a6c71b6f50240cffb755d9e4e80582bc05b7 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Wed, 7 Jun 2017 02:09:16 -0400 Subject: [PATCH] Adds code lens range to debug info --- src/gitCodeLensProvider.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gitCodeLensProvider.ts b/src/gitCodeLensProvider.ts index d6a6f3d..aa70cbc 100644 --- a/src/gitCodeLensProvider.ts +++ b/src/gitCodeLensProvider.ts @@ -237,13 +237,13 @@ export class GitCodeLensProvider implements CodeLensProvider { let title: string; if (this._documentIsDirty) { if (this._config.codeLens.recentChange.enabled && this._config.codeLens.authors.enabled) { - title = this._config.strings.codeLens.unsavedChanges.recentChangeAndAuthors; + title = this._config.strings.codeLens.unsavedChanges.recentChangeAndAuthors; } else if (this._config.codeLens.recentChange.enabled) { - title = this._config.strings.codeLens.unsavedChanges.recentChangeOnly; + title = this._config.strings.codeLens.unsavedChanges.recentChangeOnly; } else { - title = this._config.strings.codeLens.unsavedChanges.authorsOnly; + title = this._config.strings.codeLens.unsavedChanges.authorsOnly; } lens.command = { title: title } as Command; @@ -256,7 +256,7 @@ export class GitCodeLensProvider implements CodeLensProvider { const recentCommit = Iterables.first(blame.commits.values()); title = `${recentCommit.author}, ${moment(recentCommit.date).fromNow()}`; if (this._config.codeLens.debug) { - title += ` [${SymbolKind[lens.symbolKind]}(${lens.blameRange.start.line + 1}-${lens.blameRange.end.line + 1}), Commit (${recentCommit.shortSha})]`; + title += ` [${SymbolKind[lens.symbolKind]}(${lens.range.start.character}-${lens.range.end.character}), Lines (${lens.blameRange.start.line + 1}-${lens.blameRange.end.line + 1}), Commit (${recentCommit.shortSha})]`; } switch (this._config.codeLens.recentChange.command) { @@ -279,7 +279,7 @@ export class GitCodeLensProvider implements CodeLensProvider { const count = blame.authors.size; let title = `${count} ${count > 1 ? 'authors' : 'author'} (${Iterables.first(blame.authors.values()).name}${count > 1 ? ' and others' : ''})`; if (this._config.codeLens.debug) { - title += ` [${SymbolKind[lens.symbolKind]}(${lens.blameRange.start.line + 1}-${lens.blameRange.end.line + 1}), Authors (${Iterables.join(Iterables.map(blame.authors.values(), _ => _.name), ', ')})]`; + title += ` [${SymbolKind[lens.symbolKind]}(${lens.range.start.character}-${lens.range.end.character}), Lines (${lens.blameRange.start.line + 1}-${lens.blameRange.end.line + 1}), Authors (${Iterables.join(Iterables.map(blame.authors.values(), _ => _.name), ', ')})]`; } switch (this._config.codeLens.authors.command) {