Merge pull request #65622 from YisraelV/prependCategory

prepend category in keybinding editor
This commit is contained in:
Sandeep Somavarapu 2019-01-04 12:48:52 +01:00 committed by GitHub
commit 090f2376f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -235,7 +235,12 @@ export class KeybindingsEditorModel extends EditorModel {
private static getCommandLabel(menuCommand: ICommandAction, editorActionLabel: string): string {
if (menuCommand) {
return typeof menuCommand.title === 'string' ? menuCommand.title : menuCommand.title.value;
let category;
if (menuCommand.category) {
category = typeof menuCommand.category === 'string' ? menuCommand.category : menuCommand.category.value;
}
const title = typeof menuCommand.title === 'string' ? menuCommand.title : menuCommand.title.value;
return category ? `${category}: ${title}` : title;
}
if (editorActionLabel) {