mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-13 11:38:36 -05:00
Merge from vscode 8df646d3c5477b02737fc10343fa7cf0cc3f606b
This commit is contained in:
@@ -55,12 +55,17 @@ export abstract class AbstractCommandsQuickAccessProvider extends PickerQuickAcc
|
||||
// Ask subclass for all command picks
|
||||
const allCommandPicks = await this.getCommandPicks(disposables, token);
|
||||
|
||||
if (token.isCancellationRequested) {
|
||||
return [];
|
||||
}
|
||||
|
||||
// Filter
|
||||
const filteredCommandPicks: ICommandQuickPick[] = [];
|
||||
for (const commandPick of allCommandPicks) {
|
||||
const labelHighlights = withNullAsUndefined(AbstractCommandsQuickAccessProvider.WORD_FILTER(filter, commandPick.label));
|
||||
const aliasHighlights = commandPick.commandAlias ? withNullAsUndefined(AbstractCommandsQuickAccessProvider.WORD_FILTER(filter, commandPick.commandAlias)) : undefined;
|
||||
|
||||
// Add if matching in label or alias
|
||||
if (labelHighlights || aliasHighlights) {
|
||||
commandPick.highlights = {
|
||||
label: labelHighlights,
|
||||
@@ -69,6 +74,11 @@ export abstract class AbstractCommandsQuickAccessProvider extends PickerQuickAcc
|
||||
|
||||
filteredCommandPicks.push(commandPick);
|
||||
}
|
||||
|
||||
// Also add if we have a 100% command ID match
|
||||
else if (filter === commandPick.commandId) {
|
||||
filteredCommandPicks.push(commandPick);
|
||||
}
|
||||
}
|
||||
|
||||
// Add description to commands that have duplicate labels
|
||||
@@ -130,7 +140,7 @@ export abstract class AbstractCommandsQuickAccessProvider extends PickerQuickAcc
|
||||
commandPicks.push({
|
||||
...commandPick,
|
||||
ariaLabel,
|
||||
detail: this.options.showAlias ? commandPick.commandAlias : undefined,
|
||||
detail: this.options.showAlias && commandPick.commandAlias !== commandPick.label ? commandPick.commandAlias : undefined,
|
||||
keybinding,
|
||||
accept: async () => {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user