From cf99bb1a02e6bb4d9159321f9c725b28c7cb1e7f Mon Sep 17 00:00:00 2001 From: vince-fugnitto Date: Tue, 27 Jul 2021 14:48:07 -0400 Subject: [PATCH] monaco: fix quick-command separator The following commit fixes the `other commands` separator which should be present only when there are recently used commands. Signed-off-by: vince-fugnitto --- packages/monaco/src/browser/monaco-quick-command-service.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/monaco/src/browser/monaco-quick-command-service.ts b/packages/monaco/src/browser/monaco-quick-command-service.ts index 1b2d4f9fb09ae..e01452232676c 100644 --- a/packages/monaco/src/browser/monaco-quick-command-service.ts +++ b/packages/monaco/src/browser/monaco-quick-command-service.ts @@ -58,7 +58,10 @@ export class MonacoQuickCommandService extends QuickCommandService implements mo } if (otherItems.length > 0) { - items.push({ type: 'separator', label: 'other commands' }, ...otherItems); + if (recentItems.length > 0) { + items.push({ type: 'separator', label: 'other commands' }); + } + items.push(...otherItems); } return items; }