Skip to content

Commit bbefb2f

Browse files
committed
1 parent 520f919 commit bbefb2f

1 file changed

Lines changed: 4 additions & 13 deletions

File tree

src/vs/editor/contrib/hover/modesContentHover.ts

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -563,11 +563,8 @@ export class ModesContentHoverWidget extends ContentHoverWidget {
563563
const disposables = new DisposableStore();
564564
const actionsElement = dom.append(hoverElement, $('div.actions'));
565565
if (markerHover.marker.severity === MarkerSeverity.Error || markerHover.marker.severity === MarkerSeverity.Warning || markerHover.marker.severity === MarkerSeverity.Info) {
566-
const peekProblemLabel = nls.localize('peek problem', "Peek Problem");
567-
const peekProblemKeybinding = this._keybindingService.lookupKeybinding(NextMarkerAction.ID);
568-
const peekProblemKeybindingLabel = peekProblemKeybinding && peekProblemKeybinding.getLabel();
569566
disposables.add(this.renderAction(actionsElement, {
570-
label: peekProblemKeybindingLabel ? nls.localize('titleAndKb', "{0} ({1})", peekProblemLabel, peekProblemKeybindingLabel) : peekProblemLabel,
567+
label: nls.localize('peek problem', "Peek Problem"),
571568
commandId: NextMarkerAction.ID,
572569
run: () => {
573570
this.hide();
@@ -604,12 +601,8 @@ export class ModesContentHoverWidget extends ContentHoverWidget {
604601
}
605602
}));
606603

607-
const quickFixLabel = nls.localize('quick fixes', "Quick Fix...");
608-
const quickFixKeybinding = this._keybindingService.lookupKeybinding(QuickFixAction.Id);
609-
const quickFixKeybindingLabel = quickFixKeybinding && quickFixKeybinding.getLabel();
610-
611604
disposables.add(this.renderAction(actionsElement, {
612-
label: quickFixKeybindingLabel ? nls.localize('titleAndKb', "{0} ({1})", quickFixLabel, quickFixKeybindingLabel) : quickFixLabel,
605+
label: nls.localize('quick fixes', "Quick Fix..."),
613606
commandId: QuickFixAction.Id,
614607
run: (target) => {
615608
showing = true;
@@ -645,11 +638,9 @@ export class ModesContentHoverWidget extends ContentHoverWidget {
645638
dom.append(action, $(`span.icon.${actionOptions.iconClass}`));
646639
}
647640
const label = dom.append(action, $('span'));
648-
label.textContent = actionOptions.label;
649641
const keybinding = this._keybindingService.lookupKeybinding(actionOptions.commandId);
650-
if (keybinding) {
651-
label.title = `${actionOptions.label} (${keybinding.getLabel()})`;
652-
}
642+
const keybindingLabel = keybinding ? keybinding.getLabel() : null;
643+
label.textContent = keybindingLabel ? `${actionOptions.label} (${keybindingLabel})` : actionOptions.label;
653644
return dom.addDisposableListener(actionContainer, dom.EventType.CLICK, e => {
654645
e.stopPropagation();
655646
e.preventDefault();

0 commit comments

Comments
 (0)