1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-11-24 08:12:24 +02:00

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

This commit is contained in:
Laurent Cozic 2021-10-05 18:09:09 +01:00
parent 5a9bc1297b
commit 23996e0efe

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;