Skip to content

Commit a8e13f1

Browse files
author
Benjamin Pasero
committed
quick access - include history still when not searching
1 parent d519182 commit a8e13f1

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/vs/workbench/contrib/search/browser/anythingQuickAccess.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,15 +194,16 @@ export class AnythingQuickAccessProvider extends PickerQuickAccessProvider<IAnyt
194194
private readonly labelOnlyEditorHistoryPickAccessor = new QuickPickItemScorerAccessor({ skipDescription: true });
195195

196196
protected getEditorHistoryPicks(query: IPreparedQuery, range: IRange | undefined): Array<IAnythingQuickPickItem> {
197-
if (!this.configuration.includeHistory) {
198-
return []; // disabled
199-
}
200197

201198
// Just return all history entries if not searching
202199
if (!query.value) {
203200
return this.historyService.getHistory().map(editor => this.createAnythingPick(editor, range));
204201
}
205202

203+
if (!this.configuration.includeHistory) {
204+
return []; // disabled when searching
205+
}
206+
206207
// Only match on label of the editor unless the search includes path separators
207208
const editorHistoryScorerAccessor = query.containsPathSeparator ? quickPickItemScorerAccessor : this.labelOnlyEditorHistoryPickAccessor;
208209

0 commit comments

Comments
 (0)