From 17de55bd7aab66ba4129d074ac9e0bef370df0aa Mon Sep 17 00:00:00 2001 From: Alex Tugarev Date: Mon, 30 Apr 2018 19:19:21 +0200 Subject: [PATCH] [monaco] fix quick open Signed-off-by: Alex Tugarev --- packages/monaco/src/browser/monaco-quick-open-service.ts | 2 +- packages/monaco/src/typings/monaco/index.d.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/monaco/src/browser/monaco-quick-open-service.ts b/packages/monaco/src/browser/monaco-quick-open-service.ts index 0f41dfb8ad7d7..d85ec39fb7fb2 100644 --- a/packages/monaco/src/browser/monaco-quick-open-service.ts +++ b/packages/monaco/src/browser/monaco-quick-open-service.ts @@ -140,7 +140,7 @@ export class MonacoQuickOpenControllerOptsImpl implements MonacoQuickOpenControl } } if (this.options.fuzzySort) { - entries.sort((a, b) => monaco.quickOpen.QuickOpenEntry.compare(a, b, lookFor)); + entries.sort((a, b) => monaco.quickOpen.compareEntries(a, b, lookFor)); } return new monaco.quickOpen.QuickOpenModel(entries); } diff --git a/packages/monaco/src/typings/monaco/index.d.ts b/packages/monaco/src/typings/monaco/index.d.ts index 81336b56113ce..ea3f479ae4834 100644 --- a/packages/monaco/src/typings/monaco/index.d.ts +++ b/packages/monaco/src/typings/monaco/index.d.ts @@ -510,9 +510,10 @@ declare module monaco.quickOpen { setHighlights(labelHighlights: IHighlight[], descriptionHighlights?: IHighlight[], detailHighlights?: IHighlight[]): void; getHighlights(): [IHighlight[] /* Label */, IHighlight[] /* Description */, IHighlight[] /* Detail */]; run(mode: Mode, context: IEntryRunContext): boolean; - static compare(elementA: QuickOpenEntry, elementB: QuickOpenEntry, lookFor: string): number; - static highlight(entry: QuickOpenEntry, lookFor: string, fuzzyHighlight?: boolean): { labelHighlights: IHighlight[], descriptionHighlights: IHighlight[] }; } + + export function compareEntries(elementA: QuickOpenEntry, elementB: QuickOpenEntry, lookFor: string): number; + export class QuickOpenEntryGroup extends QuickOpenEntry { constructor(entry?: QuickOpenEntry, groupLabel?: string, withBorder?: boolean); getGroupLabel(): string;