Desktop: Fixes #5421: Exclude disabled commands from Goto Anything

pull/5539/head
Laurent Cozic 2021-10-05 18:09:09 +01:00
parent 5a9bc1297b
commit 23996e0efe
1 changed files with 3 additions and 0 deletions

View File

@ -124,9 +124,12 @@ export default class CommandService extends BaseService {
const output = [];
const whenClauseContext = this.currentWhenClauseContext();
for (const commandName of this.commandNames()) {
const label = this.label(commandName, true);
if (!label && excludeWithoutLabel) continue;
if (!this.isEnabled(commandName, whenClauseContext)) continue;
const title = label ? `${label} (${commandName})` : commandName;