From 76f6faa5999f6f25a1c2f9cad89f6fd2066d7143 Mon Sep 17 00:00:00 2001 From: vince-fugnitto Date: Wed, 20 Nov 2019 15:42:45 -0500 Subject: [PATCH] Remove internal commands from keybindings widget Fixes #6368 - remove internal commands (commands prefixed by `_`) from the keybindings widget. These commands should not be displayed to end users as they should not be updated. Signed-off-by: vince-fugnitto --- packages/keymaps/src/browser/keybindings-widget.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/keymaps/src/browser/keybindings-widget.tsx b/packages/keymaps/src/browser/keybindings-widget.tsx index 252c4e2513d23..6ffdbcf167d8d 100644 --- a/packages/keymaps/src/browser/keybindings-widget.tsx +++ b/packages/keymaps/src/browser/keybindings-widget.tsx @@ -455,6 +455,10 @@ export class KeybindingWidget extends ReactWidget { const items: KeybindingItem[] = []; // Build the keybinding items. for (let i = 0; i < commands.length; i++) { + // Skip internal commands prefixed by `_`. + if (commands[i].id.startsWith('_')) { + continue; + } // Obtain the keybinding for the given command. const keybindings = this.keybindingRegistry.getKeybindingsForCommand(commands[i].id); const item: KeybindingItem = {