From 593e06e4352d7e6dfadc04119d82d1360484ef4d Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 14 Jun 2016 16:14:07 +0200 Subject: [PATCH] fix highlighting issue with fuzzy and wildcards --- src/vs/base/parts/quickopen/browser/quickOpenModel.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/vs/base/parts/quickopen/browser/quickOpenModel.ts b/src/vs/base/parts/quickopen/browser/quickOpenModel.ts index b469ef7b6fa..8e7dbd5e4dc 100644 --- a/src/vs/base/parts/quickopen/browser/quickOpenModel.ts +++ b/src/vs/base/parts/quickopen/browser/quickOpenModel.ts @@ -244,6 +244,7 @@ export class QuickOpenEntry { let labelHighlights: IHighlight[] = []; let descriptionHighlights: IHighlight[] = []; + const normalizedLookFor = strings.stripWildcards(lookFor); const label = entry.getLabel(); const description = entry.getDescription(); @@ -266,6 +267,10 @@ export class QuickOpenEntry { // If there are no highlights in the label, build a path out of description and highlight and match on both, // then extract the individual label and description highlights back to the original positions let pathHighlights = filters.matchesFuzzy(lookFor, pathPrefix + label, fuzzyHighlight); + if (!pathHighlights && lookFor !== normalizedLookFor) { + pathHighlights = filters.matchesFuzzy(normalizedLookFor, pathPrefix + label, fuzzyHighlight); + } + if (pathHighlights) { pathHighlights.forEach(h => {