mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 10:08:49 +01:00
Git - fix timeline item hover rendering (#237641)
This commit is contained in:
@@ -69,19 +69,20 @@ export class GitTimelineItem extends TimelineItem {
|
||||
if (shortStat) {
|
||||
this.tooltip.appendMarkdown(`---\n\n`);
|
||||
|
||||
const labels: string[] = [];
|
||||
if (shortStat.insertions) {
|
||||
this.tooltip.appendMarkdown(`<span style="color:var(--vscode-scmGraph-historyItemHoverAdditionsForeground);">${shortStat.insertions === 1 ?
|
||||
labels.push(`<span style="color:var(--vscode-scmGraph-historyItemHoverAdditionsForeground);">${shortStat.insertions === 1 ?
|
||||
l10n.t('{0} insertion{1}', shortStat.insertions, '(+)') :
|
||||
l10n.t('{0} insertions{1}', shortStat.insertions, '(+)')}</span>`);
|
||||
}
|
||||
|
||||
if (shortStat.deletions) {
|
||||
this.tooltip.appendMarkdown(`, <span style="color:var(--vscode-scmGraph-historyItemHoverDeletionsForeground);">${shortStat.deletions === 1 ?
|
||||
labels.push(`<span style="color:var(--vscode-scmGraph-historyItemHoverDeletionsForeground);">${shortStat.deletions === 1 ?
|
||||
l10n.t('{0} deletion{1}', shortStat.deletions, '(-)') :
|
||||
l10n.t('{0} deletions{1}', shortStat.deletions, '(-)')}</span>`);
|
||||
}
|
||||
|
||||
this.tooltip.appendMarkdown(`\n\n`);
|
||||
this.tooltip.appendMarkdown(`${labels.join(', ')}\n\n`);
|
||||
}
|
||||
|
||||
if (hash) {
|
||||
|
||||
Reference in New Issue
Block a user