提交 45a4b126 编写于 作者: S Sandeep Somavarapu

Fix #90936

上级 643c3fbc
......@@ -563,8 +563,11 @@ export class ModesContentHoverWidget extends ContentHoverWidget {
const disposables = new DisposableStore();
const actionsElement = dom.append(hoverElement, $('div.actions'));
if (markerHover.marker.severity === MarkerSeverity.Error || markerHover.marker.severity === MarkerSeverity.Warning || markerHover.marker.severity === MarkerSeverity.Info) {
const peekProblemLabel = nls.localize('peek problem', "Peek Problem");
const peekProblemKeybinding = this._keybindingService.lookupKeybinding(NextMarkerAction.ID);
const peekProblemKeybindingLabel = peekProblemKeybinding && peekProblemKeybinding.getLabel();
disposables.add(this.renderAction(actionsElement, {
label: nls.localize('peek problem', "Peek Problem"),
label: peekProblemKeybindingLabel ? nls.localize('titleAndKb', "{0} ({1})", peekProblemLabel, peekProblemKeybindingLabel) : peekProblemLabel,
commandId: NextMarkerAction.ID,
run: () => {
this.hide();
......@@ -581,7 +584,6 @@ export class ModesContentHoverWidget extends ContentHoverWidget {
quickfixPlaceholderElement.textContent = nls.localize('checkingForQuickFixes', "Checking for quick fixes...");
disposables.add(toDisposable(() => quickfixPlaceholderElement.remove()));
const codeActionsPromise = this.getCodeActions(markerHover.marker);
disposables.add(toDisposable(() => codeActionsPromise.cancel()));
codeActionsPromise.then(actions => {
......@@ -602,8 +604,12 @@ export class ModesContentHoverWidget extends ContentHoverWidget {
}
}));
const quickFixLabel = nls.localize('quick fixes', "Quick Fix...");
const quickFixKeybinding = this._keybindingService.lookupKeybinding(QuickFixAction.Id);
const quickFixKeybindingLabel = quickFixKeybinding && quickFixKeybinding.getLabel();
disposables.add(this.renderAction(actionsElement, {
label: nls.localize('quick fixes', "Quick Fix..."),
label: quickFixKeybindingLabel ? nls.localize('titleAndKb', "{0} ({1})", quickFixLabel, quickFixKeybindingLabel) : quickFixLabel,
commandId: QuickFixAction.Id,
run: (target) => {
showing = true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册