register command selectors as first priority in terminal quick fix addon (#168206)

fix #168154
This commit is contained in:
Megan Rogge 2022-12-06 13:13:06 -06:00 committed by GitHub
parent aa6168def9
commit 0bae6f7964
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -87,6 +87,9 @@ export class TerminalQuickFixAddon extends Disposable implements ITerminalAddon,
@ILabelService private readonly _labelService: ILabelService
) {
super();
for (const commandSelector of this._terminalContributionService.quickFixes) {
this.registerCommandSelector(commandSelector);
}
const commandDetectionCapability = this._capabilities.get(TerminalCapability.CommandDetection);
if (commandDetectionCapability) {
this._registerCommandHandlers();
@ -97,9 +100,6 @@ export class TerminalQuickFixAddon extends Disposable implements ITerminalAddon,
}
});
}
for (const commandSelector of this._terminalContributionService.quickFixes) {
this.registerCommandSelector(commandSelector);
}
this._quickFixService.onDidRegisterProvider(result => this.registerCommandFinishedListener(convertToQuickFixOptions(result)));
this._quickFixService.onDidUnregisterProvider(id => this._commandListeners.delete(id));
}