diff --git a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts index 7cab9eec672030f03007055d692b46062e194533..24699aff23e1fbf01e6a6acb1034f4a906564ffc 100644 --- a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts +++ b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts @@ -1075,17 +1075,7 @@ class EditorHistoryHandler { // Massage search for scoring const query = prepareQuery(searchValue); - // Just return all if we are not searching - const history = this.historyService.getHistory(); - if (!query.value) { - return history.map(input => this.instantiationService.createInstance(EditorHistoryEntry, input)); - } - - // Otherwise filter by search value and sort by score. Include matches on description - // in case the user is explicitly including path separators. - const accessor = query.containsPathSeparator ? MatchOnDescription : DoNotMatchOnDescription; - return history - + const history = this.historyService.getHistory() // For now, only support to match on inputs that provide resource information .filter(input => { let resource: URI; @@ -1099,8 +1089,17 @@ class EditorHistoryHandler { }) // Conver to quick open entries - .map(input => this.instantiationService.createInstance(EditorHistoryEntry, input)) + .map(input => this.instantiationService.createInstance(EditorHistoryEntry, input)); + + // Just return all if we are not searching + if (!query.value) { + return history; + } + // Otherwise filter by search value and sort by score. Include matches on description + // in case the user is explicitly including path separators. + const accessor = query.containsPathSeparator ? MatchOnDescription : DoNotMatchOnDescription; + return history // Make sure the search value is matching .filter(e => { const itemScore = scoreItem(e, query, false, accessor, this.scorerCache);