quick access - include history still when not searching

This commit is contained in:
Benjamin Pasero 2020-03-18 10:52:46 +01:00
parent d519182aa9
commit a8e13f1c84

View file

@ -194,15 +194,16 @@ export class AnythingQuickAccessProvider extends PickerQuickAccessProvider<IAnyt
private readonly labelOnlyEditorHistoryPickAccessor = new QuickPickItemScorerAccessor({ skipDescription: true });
protected getEditorHistoryPicks(query: IPreparedQuery, range: IRange | undefined): Array<IAnythingQuickPickItem> {
if (!this.configuration.includeHistory) {
return []; // disabled
}
// Just return all history entries if not searching
if (!query.value) {
return this.historyService.getHistory().map(editor => this.createAnythingPick(editor, range));
}
if (!this.configuration.includeHistory) {
return []; // disabled when searching
}
// Only match on label of the editor unless the search includes path separators
const editorHistoryScorerAccessor = query.containsPathSeparator ? quickPickItemScorerAccessor : this.labelOnlyEditorHistoryPickAccessor;